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

Message ListMessage List     Post MessagePost Message

  Adding multiple extra fields to a single polar chart layer
Posted by David Littau on Jun-25-2012 10:30
I am drawing a polar chart that consists of dots.  Each dot appears in a separate layer so I can specify the color individually, as well as other data associated with the dot.

I am drawing the polar chart using values that are in decibels, so I graph them using one magnitude value, but I want the tool tip to show a different magnitude value.  I already figured out (with your help I'm sure) how to set the axis labels to what I want them to display.  The tool tip also needs to display a third value associated with a given dot.

From what I have found in a search, one can only add and reference one additional field per layer for a polar chart.  This is not true for an xy chart, which can have multiple additional fields per layer.  I have added a new value successfully for one of the values I want to display with my tool tip, but not for the other.

Is there a way to add mulitple extra fields per layer to a polar chart that will be indexed properly to mulitiple layers?  Alternately, is there a way to access the {value} field in the tool tip to change the value displayed?  All I need to do is subtract a constant from that number to have it be correct for my application.

C# preferred.

thanks,

David

  Re: Adding multiple extra fields to a single polar chart layer
Posted by Peter Kwan on Jun-26-2012 01:17
Hi David,

In an XYChart, each layer can have multiple data series (eg. a stacked bar layer can have multiple data series stacked together). In a PolarChart, each layer only has one data series. That's why the XYChart requires an additional level of extra fields implemented as Layer.addExtraField. The PolarLayer does not have addExtraField, but instead uses BaseChart.addExtraField.

The method to add multiple extra fields in a PolarLayer is:

//assume total of 3 layers
c.addExtraField(firstExtraFieldForLayer0);
c.addExtraField(firstExtraFieldForLayer1);
c.addExtraField(firstExtraFieldForLayer2);
c.addExtraField(secondExtraFieldForLayer0);
c.addExtraField(secondExtraFieldForLayer1);
c.addExtraField(secondExtraFieldForLayer2);

The template to address the first extra field is {dsdiField0}. The template to address the second extra field is {dsdiField3}.

Anyway, for the purpose of tooltips, one should not need to use more than one extra field per layer. The code can be structure to be like:

c.addExtraField(toolTipForLayer0);
c.addExtraField(toolTipForLayer1);
c.addExtraField(toolTipForLayer2);

The toolTipForLayer0 is an array of text string. The text can be anything, and can contain two or hundreds of numbers of you like. The tooltip is just title='{field0}'.

To subtract a constant from {value}, the code is (assume the constant is 1324):

{={value}-1324}

Hope this can help.

Regards
Peter Kwan