Page 1 of 1
How to make left and bottom axes on the same scale?
Posted: Tue Sep 22, 2015 7:42 am
by 15671379
My first day on Tchart. What an amazing tool.
I need to plot a bunch of coordinates on the chart and naturally the chart area should be equally scaled in x and y directions.
How do I set this up in runtime or through the Editor?
Re: How to make left and bottom axes on the same scale?
Posted: Tue Sep 22, 2015 1:17 pm
by Christopher
Welcome to TeeChart
uqji wrote:
How do I set this up in runtime or through the Editor?
A good place to start is the demo app, which can be found under:
%Program Files%\Steema Software\Steema TeeChart for .NET 2015 4.1.2015.08060\Examples\DemoProject\bin\ExecutableDemo\TeeChartNetExamples.exe
Run this program, then open the All Features tab then "Welcome !\Basic features".
Please don't hesitate to ask for any further help!
Re: How to make left and bottom axes on the same scale?
Posted: Wed Sep 23, 2015 8:36 am
by 15671379
Thanks, that does help a lot.
I have another question now.
How do I control the individual symbol style in a Points series pragmatically?
Dim tsrs As New Steema.TeeChart.Styles.Points(TChart1.Chart)
Basically I can set the color and label of each point by: tsrs.Add(x,y,color,label)
I can get access to the mark of each points by tsrs.Marks.Items(index).
But I don't know how to control the symbol style (e.g. square, circle) of each point. tsrs.Item(index) provides little properties that I can control.
Re: How to make left and bottom axes on the same scale?
Posted: Wed Sep 23, 2015 2:36 pm
by Christopher
Hello!
uqji wrote:But I don't know how to control the symbol style (e.g. square, circle) of each point. tsrs.Item(index) provides little properties that I can control.
You should be able to use something like:
Code: Select all
points.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Hexagon;
Re: How to make left and bottom axes on the same scale?
Posted: Thu Sep 24, 2015 1:46 am
by 15671379
points.Pointer.Style will set the style for every points in the series. I need to be able to control individual point's style. Any suggestions?
Thanks
Re: How to make left and bottom axes on the same scale?
Posted: Thu Sep 24, 2015 9:31 am
by Christopher
Hello,
uqji wrote:points.Pointer.Style will set the style for every points in the series. I need to be able to control individual point's style. Any suggestions?
Of course. You can use the GetPointerStyle event, e.g.
Code: Select all
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
Points points = new Points(tChart1.Chart);
points.FillSampleValues();
points.GetPointerStyle += Points_GetPointerStyle;
}
private void Points_GetPointerStyle(CustomPoint series, GetPointerStyleEventArgs e)
{
if(e.ValueIndex > 2 && e.ValueIndex < 9)
{
e.Style = PointerStyles.Hexagon;
e.Color = Color.Red;
}
else
{
e.Style = PointerStyles.Rectangle;
e.Color = series.Color;
}
}