Hi,
here is the sample code for the other question. So, there is a bar chart. If I add ticks on an axis, it won't use the Min/Max values anymore.
Without the ticks:
And with the added ticks:
And here is the sample code:
pascal code
procedure TIWForm1.IWAppFormShow(Sender: TObject);
var
TempAxis: TIWCGJQPlotOptionsAxesItem;
TempSeries: TIWCGJQPlotOptionsSeriesDefaults;
I: Integer;
begin
// Left Axis
TempAxis := IWCGJQPlot1.JQPlotOptions.Axes.Add;
TempAxis.AxisType := jqpoxyYAxis;
TempAxis.Options.AxesRender := jqparLinearAxisRenderer;
TempAxis.Options.Min := 0;
TempAxis.Options.Max := 250;
// Bottom Axis
TempAxis := IWCGJQPlot1.JQPlotOptions.Axes.Add;
TempAxis.AxisType := jqpoxyXAxis;
TempAxis.Options.AxesRender := jqparLinearAxisRenderer;
TempAxis.Options.Min := 0.5;
TempAxis.Options.Max := 9.5;
// Remove the comments to add the ticks...
// for I := 1 to 9 do
// TempAxis.Options.Ticks.Add(IntToStr(I));
TempSeries := IWCGJQPlot1.JQPlotOptions.Series.Add;
TempSeries.Renderer := jqprBarRenderer;
TempSeries.BarRendererOptions.BarWidth := 32;
TempSeries.BarRendererOptions.VaryBarColor := True;
IWCGJQPlot1.JQPlotData := '[[[1,225],[2,110],[3,195],[4,202.5],[5,155],[6,77.5],[7,192.5],[8,150],[9,145]]]';
end;
How can I avoid this behaviour?
Thanks in advance,
MS