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

Message ListMessage List     Post MessagePost Message

  Put different image on each marker on the chart
Posted by Vivian Peres on Nov-12-2014 03:56
Attachments:
Hello Guys,

As shown in my chart, there is the image of a circle being used as a marker for the entire
line of the axis Y. The code I'm using is this:

layer1.addDataSet(dataY,0xcf4040, "Via Condu??o").setDataSymbol2("viaConducao.png");

I would like to know if I can put an image for each marker, and not just an image on the
entire line.

Thank you a lot.
Chart.jpg

  Re: Put different image on each marker on the chart
Posted by Peter Kwan on Nov-12-2014 23:41
Hi Vivian,

You can create a scatter layer and add only the  points with the symbols to that layer. You
may refer to the sample code "Multi-Symbol Line Chart" as a reference. In that sample
code, the symbols are applied only to certain data points:

http://www.advsofteng.com/doc/cdnet.htm#multisymbolline.htm

Hope this can help.

Regards
Peter Kwan

  Re: Put different image on each marker on the chart
Posted by Vivian Peres on Nov-13-2014 02:47
Thanks Peter! It worked! But just with the symbols, and i would like to put images. Could
you help me again?

  Re: Put different image on each marker on the chart
Posted by Peter Kwan on Nov-13-2014 04:01
Hi Vivian,

You can use something like:

ScatterLayer layer = c.addScatterLayer(.........);
// use the image as the symbol
layer.getDataSet(0).setDataSymbol2("viaConducao.png");

Hope this can help.

Regards
Peter Kwan

  Re: Put different image on each marker on the chart
Posted by Vivian Peres on Nov-13-2014 23:30
It Works!

Thank you a lot!