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

Message ListMessage List     Post MessagePost Message

  To add string value to linelayer.
Posted by Megha on Nov-13-2014 18:13
How to pass String type of array to c.addLineLayer2().through my code an array of string
type is to be passed on y-axis ,how to do that.

  Re: To add string value to linelayer.
Posted by Peter Kwan on Nov-14-2014 02:46
Hi Megha,

Although you can set the axis to be a label based axis using Axis.setLabels with a string
array, you cannot use text string as x or y coordinates in the layers. Instead, you need to
use the index of the labels as the coordinates.

For example, suppose you have configured the y-axis labels to be { "Apple", "1279",
"Monday", "Tiger" }. If you want to plot a data point at "Monday", you would need to use
the y-coordinate of 2.  It is because "Monday" is the third element in the array, and its
array index is 2. If you want to plot a point in between "Apple" and "1279", you can use 0.5
as the y-coordinate. It is because the array index of "Apple" is 0, and the array index of
"1279" is 1, so 0.5 is the position in between these two labels.

Hope this can help.

Regards
Peter Kwan