Search code examples
c++builderteechart

How do i modify a teechart series value?


I created a simple Gantt chart with one Gantt bar:

AnsiString date1, date2;
date1 = "25/04/1990";
date2 = "15/05/1990";
Series1 = new TGanttSeries(this);
Series1->ParentChart= Chart1;
Series1->AddGantt(StrToDate(date1), StrToDate(date2), StrToFloat("12,0"), "Main Task");

And now I need to change the gantt bar value. How do I do it? For example, instead of date2 being 15/05/1990, I want to change it to 25/05/1990? It's very confusing. Can anyone help me?


Solution

  • At teechart.net it's suggested the values can be changed.

    You should set Modified to True after changing values in the Value array directly by code.

    Example:

    Series1.YValues.Value[12] := 123.45;

    Series1.YValues.Modified := True;