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.

How to delete Labels on IShortLineChartObject objects ?
 Post subject: How to delete Labels on IShortLineChartObject objects ? Post rating: 0   New post Posted: Mon 19 Aug, 2019, 16:16 

User rating: 2
Joined: Mon 05 Nov, 2012, 11:56
Posts: 80
Location: Germany,
Hi,

These labels on IShortLineChartObject objects are messing up my chart completely... how to turn them off ??
See below 2 such objects in a screenshot:



IShortLineChartObject shortLine1 = factory.createShortLine(sdf.format(new Date( feedData.getTime()) )+"shortl1",
history.getTimeForNBarsBack(periodx, bar.getTime(), 2), x, history.getTimeForNBarsForward(periodx, bar.getTime(), 2), x);

IShortLineChartObject shortLine2 = factory.createShortLine(sdf.format(new Date( feedData.getTime()) )+"shortl2",
bar.getTime(), x-3*feedDescriptor.getInstrument().getPipValue(), bar.getTime(), x+ 3*feedDescriptor.getInstrument().getPipValue() );




Image

Thanks!


Attachments:
labels.JPG [10.8 KiB]
Downloaded 270 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: How to delete Labels on IShortLineChartObject objects ? Post rating: 0   New post Posted: Mon 19 Aug, 2019, 23:27 

User rating: 18
Joined: Thu 20 Apr, 2017, 22:42
Posts: 165
Location: Russian Federation,
public interface IChartObject {

    /**
     * Sets show label option.
     *
     * System default value: <b>true</b>
     * @param showLabel show label option
     */
    void setShowLabel(boolean showLabel);


 
 Post subject: Re: How to delete Labels on IShortLineChartObject objects ? Post rating: 0   New post Posted: Tue 20 Aug, 2019, 08:26 

User rating: 2
Joined: Mon 05 Nov, 2012, 11:56
Posts: 80
Location: Germany,
mtnfx wrote:
public interface IChartObject {

    /**
     * Sets show label option.
     *
     * System default value: <b>true</b>
     * @param showLabel show label option
     */
    void setShowLabel(boolean showLabel);




                          shortLine1.setShowLabel(false);
           shortLine2.setShowLabel(false);


thanks but it is not working...still the labels are shown on the chart..


 
 Post subject: Re: How to delete Labels on IShortLineChartObject objects ? Post rating: 0   New post Posted: Tue 20 Aug, 2019, 08:50 
JForex Master
User avatar

User rating:
Joined: Wed 16 Sep, 2009, 18:23
Posts: 1049
Location: Geneva, Switzerland
Disable not the label, but "Distance".

public interface IShortLineChartObject extends IDecoratedChartObject, IInclinedChartObject {
    /**
     * Sets show distance option.
     *
     * System default value: <b>true</b>
     * @param showDistance show distance option
     */
    void setShowDistance(boolean showDistance);

    /**
     * Returns show distance option.
     *
     * System default value: <b>true</b>
     * @return show distance option
     */
    boolean isDistanceShown();

}


 

Jump to:  

  © 1998-2024 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