Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Try to find an answer in Wiki before asking a question.
    Submit programming questions in this forum only.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

getChartObjectFactory remove the label
 Post subject: getChartObjectFactory remove the label Post rating: 0   New post Posted: Mon 02 Feb, 2015, 08:49 
User avatar

User rating: 0
Joined: Fri 17 Jan, 2014, 18:13
Posts: 72
Location: NetherlandsNetherlands
uur = history.getBar( ins, Period.ONE_HOUR, kaart.getSelectedOfferSide(), i );
            ding = kaart.getChartObjectFactory().createRectangle(
                "SemperUur_" + Integer.toString(i),
                uur.getTime(),
                uur.getOpen() ,
                uur.getTime() + Period.ONE_HOUR.getInterval(),
                uur.getClose()
            );
            if( uur.getOpen() < uur.getClose() ){
                ding.setColor( Color.green );
            }else{
                ding.setColor( Color.red );
            }
            ding.setLineStyle( LineStyle.SOLID );
            ding.setLineWidth( 0f );
            ding.setLocked( true );
            ding.setMenuEnabled( false );
            ding.setTooltip( "" );
            ding.setText( "" );
            kaart.addToMainChart( ding );


All works fine. Now i want to remove the label.

There is a property IsLabelEnabled(), but that only gives back a boolean. I want to set LabelEnabled( false );

How?

Thanks


 
 Post subject: Re: getChartObjectFactory remove the label Post rating: 0   New post Posted: Mon 02 Feb, 2015, 13:08 
User avatar

User rating: 164
Joined: Mon 08 Oct, 2012, 10:35
Posts: 676
Location: NetherlandsNetherlands
You can do it with ObjectListeners.
Take a look on the following wiki page for examples:
https://www.dukascopy.com/wiki/#Handle_c ... ect_events


 
 Post subject: Re: getChartObjectFactory remove the label Post rating: 0   New post Posted: Mon 02 Feb, 2015, 13:59 
User avatar

User rating: 0
Joined: Fri 17 Jan, 2014, 18:13
Posts: 72
Location: NetherlandsNetherlands
That is quite a workaround for something that should be simple.

The given example is outdated. Deprecated methods.


 
 Post subject: Re: getChartObjectFactory remove the label Post rating: 0   New post Posted: Wed 04 Feb, 2015, 09:36 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Do you want the ability to remove the size of a rectangle in bottom right corner?


 
 Post subject: Re: getChartObjectFactory remove the label Post rating: 0   New post Posted: Wed 04 Feb, 2015, 09:38 
User avatar

User rating: 0
Joined: Fri 17 Jan, 2014, 18:13
Posts: 72
Location: NetherlandsNetherlands
Nope: the rectangles are drawn every hour and have fixed sizes and positions. I just want to get rid of the labels.


 
 Post subject: Re: getChartObjectFactory remove the label Post rating: 0   New post Posted: Wed 04 Feb, 2015, 11:32 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Image

That's what you want to remove, right?


Attachments:
size_of_a_rectangle.png [10.9 KiB]
Downloaded 257 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control on their content. Anyone accessing this webpage and downloading or otherwise making use of any document, data or information found on this webpage shall do it on his/her own risks without any recourse against Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from the use and/or reliance on any document, data or information found on this webpage.
 
 Post subject: Re: getChartObjectFactory remove the label Post rating: 0   New post Posted: Wed 04 Feb, 2015, 11:33 
User avatar

User rating: 0
Joined: Fri 17 Jan, 2014, 18:13
Posts: 72
Location: NetherlandsNetherlands
Right. Thanks for the help. The rectangles are drawn with:

thing = chart.getChartObjectFactory().createRectangle( ...


 
 Post subject: Re: getChartObjectFactory remove the label Post rating: 0   New post Posted: Wed 04 Feb, 2015, 11:45 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Currently it's impossible to remove this information, but we will add the possibility in near future.


 
 Post subject: Re: getChartObjectFactory remove the label Post rating: 0   New post Posted: Wed 04 Feb, 2015, 11:56 
User avatar

User rating: 0
Joined: Fri 17 Jan, 2014, 18:13
Posts: 72
Location: NetherlandsNetherlands
Thanks.


 

Jump to:  

cron
  © 1998-2025 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com