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

Message ListMessage List     Post MessagePost Message

  box-whisker outliner
Posted by Lasly on Sep-09-2009 21:31
Attachments:
hi guy,
i'm a italian  junior developer  and i need some help from you, I have to create a
box-whisker  with outlier.
I tried to search in the official documentation, but without success.


Is it possible to get a graphic like the attached image with chartdirectory??




thank you very much
outlier.PNG

  Re: box-whisker outliner
Posted by Peter Kwan on Sep-10-2009 01:12
Hi Lasly,

Yes. It is quite easy to create the chart you need in ChartDirector.

ChartDirector has a layering architecture. You can combine any number of XYChart layers to create the chart you need. In your case, you can use a box-whisker layer for the box-whisker symbols, and a scatter layer for the circle symbols.

For example, in VB/VBScript:

'y-coordinates of the circles
circleY = Array(45, 67, 88, 43, 45)

'x-coordinates of the circles. 0 = first x-label position, 1 = second x-label position, etc.
circleX = Array(0, 0, 2, 2, 2)

'11 pixel circles with black border and no fill
Call c.addScatterLayer(circleX, circleY, "", cd.CircleSymbol, 11, cd.Transparent, &H000000)

'add box-whisker layer like in the Box-Whisker Chart sample code in ChartDirector
Call c.addBoxWhiskerLayer(.....)

Hope this can help.

Regards
Peter Kwan

  Re: box-whisker outlier
Posted by Lasly on Sep-10-2009 16:44
Hello Peter!  ^^
I love you!
works!
You are my savior!
a big kiss!

Now I am a happy girl.

thanks :-)

Lasly Genoese

  Re: box-whisker outliner
Posted by Mali Guven on Oct-26-2015 21:21
I was able to get my Box-Whisker plot with outliers with the help of this thread. Thanks..  The tooltips for boxes are displayed fine using the following.

  *imageMap = c->getHTMLImageMap("clickable",
    "x={x}&xLabel={xLabel}&dataSet={dataSet}&dataSetName={dataSetName}&value={value}&dataItem={dataItem}",
    "title='{xLabel}\\nmax: {max|P3}\\nQ3: {top|P3}\\nQ2: {med|P3}\\nQ1: {bottom|P3}\\nmin: {min|P3}'"
    );

And I use the following code to add the outliers

c->addScatterLayer(DoubleArray(outliers_x,n_outliers),DoubleArray(outliers_y,n_outliers),"",Chart::CrossSymbol);

Although the outliers are plotted correctly, I have a problem with displaying the tooltips for the outliers. It is not clear to me how to update the imageMap to get the outliers displayed in x-y coordinates.

Thanks in advance.
Mali Guven

  Re: box-whisker outliner
Posted by Peter Kwan on Oct-27-2015 02:53
Hi Mali,

You can use Layer.setHTMLImageMap to configure a separate image map for the scatter
layer. For example:

ScatterLayer *layer = c-
>addScatterLayer(DoubleArray(outliers_x,n_outliers),DoubleArray(outliers_y,n_outliers),"",Ch
art::CrossSymbol);

c->setHTMLImageMap("clickable", "x={x}&xLabel={xLabel}&dataSet=
{dataSet}&dataSetName={dataSetName}&value={value}&dataItem={dataItem}",
"title='{xLabel}\\n: {value|P3}'");

Hope this can help.

Regards
Peter Kwan

  Re: box-whisker outliner
Posted by Mali Guven on Oct-28-2015 20:55
Peter,

Thank you. It does help.

Just to clarify, I believe it was meant

layer->setHTMLImageMap ( ...

Mali Guven