Hi
I am trying to create a Tchart at runtime and connect a set of TFastline series and TpointSeries to it. I want to set the X axis and Y axis to absolute values and plot both lines and points on the graph at various coordinates. This works fine. However
If I create TpointSeries and then use "AddXY(x,y,string)" where string is the label of the point this screws up the X axis scaling. If I use "AddXY(x,y)" this works. I want to keep the X axis scaling as set, but also be able to show a label at each point. I have attached a form showing the problem. I have set "bottomaxis.automatic:=false"
Secondly, when I show the point label I would like to be able to position it relative to the point coordinate as the label is a little close to the point shape
Thanks
Richard
Problem with TPointSeries and Xaxis
-
- Newbie
- Posts: 2
- Joined: Fri May 02, 2014 12:00 am
-
- Newbie
- Posts: 2
- Joined: Fri May 02, 2014 12:00 am
Re: Problem with TPointSeries and Xaxis
Ah
I fixed the main problem. I need to set the TChart.Axes.Bottom.LabelStyle:=talvalue; But it would be nice to be able to manipulate the position of the point label relative to the point
I fixed the main problem. I need to set the TChart.Axes.Bottom.LabelStyle:=talvalue; But it would be nice to be able to manipulate the position of the point label relative to the point
Re: Problem with TPointSeries and Xaxis
Hi Richard,
If you want an axis label at each series point, you can set LabelStyle to talAuto/talText.
If you want an axis label at each series point but displaced with an offset, you should use custom labels. You can find an example of the custom axis labels at "All Features\Welcome !\Axes\Labels\Custom Labels" in the features demo included with the installation.
DiagnosysUK wrote:I am trying to create a Tchart at runtime and connect a set of TFastline series and TpointSeries to it. I want to set the X axis and Y axis to absolute values and plot both lines and points on the graph at various coordinates. This works fine. However
If I create TpointSeries and then use "AddXY(x,y,string)" where string is the label of the point this screws up the X axis scaling. If I use "AddXY(x,y)" this works. I want to keep the X axis scaling as set, but also be able to show a label at each point. I have attached a form showing the problem. I have set "bottomaxis.automatic:=false"
Having labels in a series makes the bottom axis to show these strings if the axis has the default LabelStyle talAuto. As you've observed, forcing it to talValue makes the axis to still calculate the axis labels as if the series didn't have labels.DiagnosysUK wrote:I fixed the main problem. I need to set the TChart.Axes.Bottom.LabelStyle:=talvalue;
DiagnosysUK wrote:Secondly, when I show the point label I would like to be able to position it relative to the point coordinate as the label is a little close to the point shape
I'm not sure to see what are you exactly trying to do here.DiagnosysUK wrote:But it would be nice to be able to manipulate the position of the point label relative to the point
If you want an axis label at each series point, you can set LabelStyle to talAuto/talText.
If you want an axis label at each series point but displaced with an offset, you should use custom labels. You can find an example of the custom axis labels at "All Features\Welcome !\Axes\Labels\Custom Labels" in the features demo included with the installation.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |