Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 791
  • Last Modified:

chartFX

A have made a graph in chartFX and i want to get the values from it.

I haven tried different methods from the help-section but it wont work.

Please write exactly what to do if i want to get the value of, serie 1, point 1.

The graph is called ChartFX1

Regards Jakob
0
Jakob Adeltoft
Asked:
Jakob Adeltoft
1 Solution
 
javiertbCommented:
Imagine you have a chart with 2 series and 3 values each.
Here you introduce the values:
ChartFX1.OpenDataEx(COD_VALUES,2,3); {Make sure you include                                           cfxocx2 in your uses clause}

ChartFX1.ThisSerie:=0; {Now working with the 1st serie}
ChartFX1.Value[0]:=30;
ChartFX1.Value[0]:=20;
ChartFX1.Value[0]:=40;
ChartFX1.ThisSerie:=1; {Now working with the 2nd serie}
ChartFX1.Value[0]:=15;
ChartFX1.Value[0]:=45;
ChartFX1.Value[0]:=25;
ChartFX1.CloseData(COD_VALUES);

Now, if you want to get a value from the first point of the first serie do the following:

var  
    ReturnValue: Real;

ChartFX1.ThisSerie:=0; {Set the working serie the 1st one}
ReturnValue:=ChartFX1.Value[0];  {Here you have the value}

Regards.
Javi
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now