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

Message ListMessage List     Post MessagePost Message

  Show z values on scatter points
Posted by Markus on Jun-27-2017 01:48
is it possible to show the z-values close to the scatter points in a XYChart?

I wasn't able to understand if addExtraField could do this and if how.

  Re: Show z values on scatter points
Posted by Peter Kwan on Jun-27-2017 17:06
Hi Markus,

The code is like (in C#/Java);

double[] xData = ....;
double[] yData = ....;
double[] zData = ....;


ScatterLayer layer = c.addScatterLayer(xData, yData, ......);
layer.addExtraField(zData);

// display the extra field as the data label
layer.setDataLabelFormat("{field0}");

// You can position the labels using Center, Left, Right, Top, Bottom ... as the alignment
layer.setDataLabelStyle("arialbd.ttf", 10, 0x000000).setAlignment(Chart.Left);


Hope this can help.

Regards
Peter Kwan

  Re: Show z values on scatter points
Posted by Markus on Jun-27-2017 18:08
thank you, works perfect. great support!