X value 0 when it shouldn't
Posted: Sun Apr 16, 2006 6:59 pm
I used the code
procedure TMultiDBChart.DoClickSeries(Sender: TCustomChart; Series: TChartSeries; ValueIndex: Integer; Button: TMouseButton; Shift: TShiftState; x, y: Integer);
begin
strX := Series.XValueToText(Series.XValues[ValueIndex]));
strY := Series.YValueToText(Series.YValues[ValueIndex]));
end;
and set Chart1.Series1.XValues.DateTime := True.
The Y value is being assigned but the X value keeps coming up the Date 12/31/1899. Can you suggest something else I might be doing wrong? When I tried just getting the double value using the code dbValue := Series.XValue[ValueIndex], I get 0.
procedure TMultiDBChart.DoClickSeries(Sender: TCustomChart; Series: TChartSeries; ValueIndex: Integer; Button: TMouseButton; Shift: TShiftState; x, y: Integer);
begin
strX := Series.XValueToText(Series.XValues[ValueIndex]));
strY := Series.YValueToText(Series.YValues[ValueIndex]));
end;
and set Chart1.Series1.XValues.DateTime := True.
The Y value is being assigned but the X value keeps coming up the Date 12/31/1899. Can you suggest something else I might be doing wrong? When I tried just getting the double value using the code dbValue := Series.XValue[ValueIndex], I get 0.