Subchart properties

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
lilo
Newbie
Newbie
Posts: 14
Joined: Fri Sep 07, 2012 12:00 am

Subchart properties

Post by lilo » Mon Jan 28, 2013 1:46 am

Hi,

I have created a new subchart:

Dim chart = SubChartTool1.Charts.AddChart("Chart0")
chart.Series.Add(New Steema.TeeChart.Styles.FastLine())

How do I change the line width on the subchart?

Dim chart = SubChartTool1.Charts.AddChart("Chart0")
chart.Series.Add(New Steema.TeeChart.Styles.Points())

How do I access the pointer properties?

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Subchart properties

Post by Sandra » Mon Jan 28, 2013 12:34 pm

Hello lilo,

To access to pointer the same way as you do when add the series in the Chart. See next code:

Code: Select all

Dim chart = SubChartTool1.Charts.AddChart("Chart0")
chart.Series.Add(New Steema.TeeChart.Styles.FastLine())

How do I change the line width on the subchart?

Dim chart = SubChartTool1.Charts.AddChart("Chart0")
chart.Series.Add(New Steema.TeeChart.Styles.Points())
(chart(0) as Steema.TeeChart.Styles.Points).Pointer.Visible=True
Could you tell us if previous code works in your end?If you have any problems please let me know.

Thanks,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

lilo
Newbie
Newbie
Posts: 14
Joined: Fri Sep 07, 2012 12:00 am

Re: Subchart properties

Post by lilo » Tue Jan 29, 2013 2:25 am

This does not work, I get a syntax error.
Dim chart = SubChartTool1.Charts.AddChart("Chart0")
chart.Series.Add(New Steema.TeeChart.Styles.Points())
(chart(0) as Steema.TeeChart.Styles.Points).Pointer.Visible=True
~

I have tried:

chart.Pointer.Visible=True
chart.series(0).pointer.visible=True
plus other variations

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Subchart properties

Post by Sandra » Tue Jan 29, 2013 9:58 am

Hello lilo,

Please check if my new suggestion of code works in your end:

Code: Select all

    Private Sub InitializeChart()
        SubChartTool1 = New Steema.TeeChart.Tools.SubChartTool(TChart1.Chart)
        tChart2 = SubChartTool1.Charts.AddChart("Chart0")
        TChart1.Series.Add(New Steema.TeeChart.Styles.FastLine())
        TChart1(0).FillSampleValues()
        tChart2.Series.Add(New Steema.TeeChart.Styles.Points())
        tChart2(0).FillSampleValues()
        TryCast(tChart2(0), Steema.TeeChart.Styles.Points).Pointer.Visible = True
    End Sub
I hope will helps.

Thanks,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

lilo
Newbie
Newbie
Posts: 14
Joined: Fri Sep 07, 2012 12:00 am

Re: Subchart properties

Post by lilo » Tue Jan 29, 2013 5:11 pm

This works well, Thank You!!

Post Reply