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

Message ListMessage List     Post MessagePost Message

  placing custom symbol on chart
Posted by jef smit on May-23-2025 06:50
Attachments:
me again:

I have a chart I want to place a directional arrow in the upper right region (see file) and since it is only one point on the chart it still needs to be in a DoubleArray for AddScatterLayer(*) so I artificially created arrays for x and y of size 2 with duplicate values to get it to work like this:

double* xa = new double[2];
double* ya = new double[2];
xa[0] = 0.9;
xa[1] = 0.9;
ya[0]= 0.9 * max_sd_value; (from largest y value to keep it on graph)
ya[1] = ya[0];
int symbol[] = { Chart::ArrowShape(135, .7, .1, .5), Chart::ArrowShape(135, .7, .1, .5) };//add arrow to chart
const int symbolsize = (int)(sizeof(symbol) / sizeof(*symbol));
c->addScatterLayer(DoubleArray(xa, symbolsize), DoubleArray(ya, symbolsize), "", symbol[0], 30, 0xFF0000, -1);

Seems clunky and my inexperience showing here but wondered if there's a way without doublearray?
thanks,
jeff
arrowprob.jpg

  Re: placing custom symbol on chart
Posted by Peter Kwan on May-23-2025 11:54
Hi jef,

You may try:

double xa = 0.9;
double ya = 0.9 * max_sd_value;
c->addScatterLayer(DoubleArray(&xa, 1), DoubleArray(&ya, 1), "", Chart::ArrowShape(135, .7, .1, .5), 30, 0xFF0000, -1);

Best Regards
Peter Kwan