Page 1 of 1

TBarSeries Date/Time axis

Posted: Fri Nov 07, 2014 3:31 pm
by 16468913
Hi. I'm working with last version of Pro VCL chart.

In a chart with several stacked bar series (created by code)

Code: Select all

BSeriePCR :=TBarSeries.Create(Chart_CADO);
ChartCADO.AddSeries(BSeriePCR);
BSeriePCR.Multibar :=mbStacked;
BseriePCR.Color :=clPCR;
BSeriePCR.Marks.Visible :=false;
I can't find a way to set [by code ]LeftAxis to be a DateTime axis with 'nn:ss' value.

The only way I can draw the chart the way I need it is, creating in design time one pair of stacked TBarSeries and set in the designer, the left axis to be DateTime.

The problem is that I need to clear all data from the chart before creating an filling the series. Is there any way to set the left axis "DateTime" property I see in design time ?.

Best regards.

Matias.

Re: TBarSeries Date/Time axis

Posted: Fri Nov 07, 2014 3:43 pm
by narcis
Hi Matias,

Sure, you can do:

Code: Select all

  Series1.YValues.DateTime:=True;
  Series1.GetVertAxis.DateTimeFormat:='nn:ss';

Re: TBarSeries Date/Time axis

Posted: Mon Nov 10, 2014 1:31 pm
by 16468913
Thanks NarcĂ­s, it was what I needed.

Best regards.