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

Message ListMessage List     Post MessagePost Message

  Need Suggestion on choosing the right graph
Posted by Sam on Jan-26-2018 10:55
Attachments:
Hi, I am new to chart director.I wanted to build a Bubble chart with x-axis as titles and y-axis with %values. Where as in chart director for bubble chart API it needs the double[] as data for x-axis and y-axis.  Can some one please suggest how do i represent bubble chart with my scenario. Attached my Chart view.
Untitled.png

  Re: Need Suggestion on choosing the right graph
Posted by Peter Kwan on Jan-26-2018 12:08
Hi Sam,

For the x-coordinates, just use an empty array with zero elements or a value that indicates there is no parameter. The exact code depends on your programming language. It can be "null" or "DoubleArray(0, 0)" or "nil" or "Nothing", etc., depending on the programming langauge. The x-axis can be configured with labels using Axis.setLabels.

An example in C#/Java is:

ScatterLayer layer = c.addScatterLayer(null, dataY, ......);
c.xAxis().setLabels(anArrayOfTextStrings);

If there is no x-coordinates for the scatter layer, ChartDirector will just put one symbol at each label position.

For the y-coordinate, you can treat the "%" as a unit, just like "km", "kg" are units. There is no need to include the unit in the data array. For example, for 116%, just use 116 as the data value. On the y-axis, you can configure the formatting as follows:

//The following is in C#/Java
c.yAxis().setLabelFormat("{value}%");

It means to display the axis label, followed by a "%" character.

Hope this can help.

Regards
Peter Kwan

  Re: Need Suggestion on choosing the right graph
Posted by Sam on Jan-27-2018 20:31
Hi Peter,

Thanks for the Help. It solved my Problem. Same way can we make the y-axis labels as custom and pass the y-axis values as null? As per document y-axis is mandatory it seems.

Appreciate your Help.


Thanks & Regards
Sam
Peter Kwan wrote:

Hi Sam,

For the x-coordinates, just use an empty array with zero elements or a value that indicates there is no parameter. The exact code depends on your programming language. It can be "null" or "DoubleArray(0, 0)" or "nil" or "Nothing", etc., depending on the programming langauge. The x-axis can be configured with labels using Axis.setLabels.

An example in C#/Java is:

ScatterLayer layer = c.addScatterLayer(null, dataY, ......);
c.xAxis().setLabels(anArrayOfTextStrings);

If there is no x-coordinates for the scatter layer, ChartDirector will just put one symbol at each label position.

For the y-coordinate, you can treat the "%" as a unit, just like "km", "kg" are units. There is no need to include the unit in the data array. For example, for 116%, just use 116 as the data value. On the y-axis, you can configure the formatting as follows:

//The following is in C#/Java
c.yAxis().setLabelFormat("{value}%");

It means to display the axis label, followed by a "%" character.

Hope this can help.

Regards
Peter Kwan

  Re: Need Suggestion on choosing the right graph
Posted by Sam on Jan-27-2018 21:04
Hi Peter,

Ignore My Question. we found the Solution.

Thanks