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

Message ListMessage List     Post MessagePost Message

  Seperate data set for symbol color on scatter chart.
Posted by Ed Hermanson on May-01-2018 04:28
On a scatter chart I need the symbol colors to be red (negative) or green (positive) based on a different data array than the main dataset. How would this be accomplished with chart director?

Thank you!

Edward

  Re: Seperate data set for symbol color on scatter chart.
Posted by Peter Kwan on May-01-2018 16:02
Hi Ed,

You can split them into two groups of symbols, one red and one green. Then you can use two scatter layers to plot the symbols.

There is an example at:

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

In the above sample, the ArrayMath.selectEQZ is used to select the data into the scatter layers based on another data array. In this way, different type of data can be scatter symbols of different shapes and colors.

Hope this can help.

Regards
Peter Kwan

  Re: Seperate data set for symbol color on scatter chart.
Posted by Ed Hermanson on May-02-2018 01:35
Thanks for the info. I had a slightly different need and I figured it out so I thought I would share. I need to use a standard xData and yData array for the actual plotting of the points on the chart but the color of the symbols had to be based on a decision array NOT using either of the original data arrays or subsets of them but on a completely different array of data points. This couldn't be done natively so as there are 36 data points I had to create 36 scatter layers so I could set the color of each independently base on the data from another array. I was at first worried it would be slow but it worked well with just a for loop going through all 3 arrays.

Thanks for your help!
Edward