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

Message ListMessage List     Post MessagePost Message

  Regarding displaying two values on the same label and calculating there difference
Posted by Mikey on Jan-06-2015 18:24
Attachments:
Hello

I want to plot three different values of two different references i.e I want to plot current on
y axis, logtime on x-axis and the BAG value of a segment should be displayed on that
particular value of current and logtime. These values will be plotted of two different
reference  ,the first one is the best refernce and I want to compare this refernce with the
actual live values.On the graph I want to show the difference of the BAG values of both the
references on a particular logtime and current value.

In this way I want to show my graph.Can I achieve this through ChartDirector???I think Bar
Graph will be best.If there is any other graph to represent what I want to show ,please tell
how and which one.
my display.png

  Re: Regarding displaying two values on the same label and calculating there difference
Posted by Peter Kwan on Jan-07-2015 02:42
Hi Mikey,

Yes, ChartDirector can achieve you need. The exact chart type depends on the nature of
your data.

Sorry, I think I do not completely understand how your chart is created. Anyway, if you
would like to plot a stacked bar chart, or a overlay bar chart, and you want to display the
difference between two bar segments on top of the bars, you can use
addCustomAggregateLabel. For example, in Java, it is like:

BarLayer layer = c.addBarLayer2(Chart.Stack);
layer.addDataSet(dataArray1, color1, "ABC");
layer.addDataSet(dataArray2, color2, "DEF");

for (int i = 0; i < dataArray1.Length; ++i)
   layer.addCustomAggregateLabel(i, "" + (dataArray1[i] - dataArray2[i]), "Arial Bold", 10,
0x000000);

To show detail data values and their differences on the chart, another method is to put
"data table" on the x-axis. For example, see"

http://www.advsofteng.com/doc/cdjava.htm#datatable2.htm

Hope this can help.

Regards
Peter Kwan