Page 1 of 1

Problem with negative values in a TLine series

Posted: Wed Jun 18, 2008 8:00 pm
by 10546019
Hi,

I'm using a Tline series of DBChart to connect directly to a client dataset field. The graph generated shows all the correct values except the negative ones that are cutted out of the graph. Below you can see the code used.

DBChart1.RemoveAllSeries;
DBChart1.AddSeries(TlineSeries.Create(Self));
DBChart1.Series[0].DataSource := dmGraficos.cdsUUR;
DBChart1.Series[0].Title := dmGraficos.cdsUUR.Fields[varID-1].FieldName;
DBChart1.Series[0].XValues.ValueSource := dmGraficos.cdsUUR.Fields[dmGraficos.cdsUUR.FieldCount-1].FieldName;
DBChart1.Series[0].XValues.DateTime := TRUE;
DBChart1.Series[0].YValues.ValueSource := dmGraficos.cdsUUR.Fields[varID-1].FieldName;

I have inspected the values from the dataset before the transfer to the YValue series and the negative values are correct. If I pause the program just after the transfer line, the YValues vector show zeros instead of the negative values. An image of resultant graph was just stored in your upload page (excesso.gif).

Can you see what is the setting that I must adjust to allow the negative values in this graph?

Thanks in advance,
gparreira

Posted: Thu Jun 19, 2008 9:04 am
by narcis
Hi gparreira,

Could you please send us a simple example project (you can use random or manual data) we can run "as-is" to reproduce the problem here?

Thanks in advance.