ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  AddMark not showing
Posted by AddMark on Oct-26-2017 23:09
Hi Peter,

Suppose I have a bar chart with 2 numbers: 20,000 and 16,000.

If I do addMark = 18000, the horizontal line shows on the chart.

But if I do 400000, the line doesn't show because it's far above the maximum on the Y axis which a bit above 20000.

Is there a way to show the mark in such a case?

If not is my only option to add a line layer? I tried this but the line shows only over the two bars.

Thanks,

Marc

  Re: AddMark not showing
Posted by Peter Kwan on Oct-27-2017 01:54
Hi,

If your code does not specify the axis scale (eg. using Axis.setLinearScale), ChartDirector will automatically compute the axis scale based on the data in the layers. In your case, it would only consider the bars in determining the axis scale. If the mark is outside the axis scale, it will not be displayed.

If you prefer to let ChartDirector automatically determine the axis scale, you can add a transparent layer with the mark value. For example, in C#, it is like:

c.addLineLayer(new double[] { myMarkValue }, Chart.Transparent);

The above line will have no visible effect on the chart as it is transparent, but it will cause ChartDirector to consider the myMarkValue when determining the axis scale.

Hope this can help.

Regards
Peter Kwan