How to get normal callouts with Web theme.

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
biqpaulson
Newbie
Newbie
Posts: 93
Joined: Thu Apr 17, 2008 12:00 am

How to get normal callouts with Web theme.

Post by biqpaulson » Wed Mar 08, 2017 9:55 pm

Hello,

I would like to get normal callouts with the web theme.
In the following pictures please ignore the colors which in web theme are horrendous. Please concentrate on just the Marks.

I would like the Marks callout style which is in this chart:
WithoutWebTheme.PNG
WithoutWebTheme.PNG (17.86 KiB) Viewed 11261 times
But if I apply the Web theme I get this:
WithWebTheme.PNG
WithWebTheme.PNG (14.43 KiB) Viewed 11262 times
I used this code to display the two types. (uncomment out the

Code: Select all

// #define USE_WEB_THEME
to change)

Code: Select all

// #define USE_WEB_THEME
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace TestCallouts
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            InitializeChart();
        }

        private void InitializeChart()
        {
            tChart1.Aspect.View3D = true;
            Steema.TeeChart.Styles.Pie TheSeries = new Steema.TeeChart.Styles.Pie();
            TheSeries.FillSampleValues(5);
#if (USE_WEB_THEME)
            Steema.TeeChart.Themes.Theme theme;
            theme = new Steema.TeeChart.Themes.WebTheme(tChart1.Chart);
            theme.Apply();
#endif
            TheSeries.Marks.Visible = true;
            tChart1.Series.Add(TheSeries);
        }
    }
}
So, how do I get back to the normal style of marks callouts when using the web theme?

Also, is there a place that a customer can look to see the difference between(/changes done for each) the themes?

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: How to get normal callouts with Web theme.

Post by Christopher » Thu Mar 09, 2017 5:07 pm

Hello,

If I'm not mistaken, the property you are looking is this one:

Code: Select all

    Pie series;
    private void InitializeChart()
    {
      series = new Pie(tChart1.Chart);
      series.FillSampleValues();

      series.Marks.TailStyle = MarksTail.WithPointer;
    }
I'm afraid there is no available list of properties which are modified for each theme, as the relevant files are only in binary format (*.ten).
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

biqpaulson
Newbie
Newbie
Posts: 93
Joined: Thu Apr 17, 2008 12:00 am

Re: How to get normal callouts with Web theme.

Post by biqpaulson » Thu Mar 09, 2017 8:15 pm

Changing the test by adding the code you gave me there is no change in the chart.

Code: Select all

#define USE_WEB_THEME
using Steema.TeeChart.Styles;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace TestCallouts
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            InitializeChart();
        }

        private void InitializeChart()
        {
            tChart1.Aspect.View3D = true;
            Steema.TeeChart.Styles.Pie TheSeries = new Steema.TeeChart.Styles.Pie();
            TheSeries.FillSampleValues(5);
#if (USE_WEB_THEME)
            Steema.TeeChart.Themes.Theme theme;
            theme = new Steema.TeeChart.Themes.WebTheme(tChart1.Chart);
            theme.Apply();
#endif
            TheSeries.Marks.Visible = true;
            TheSeries.Marks.TailStyle = MarksTail.WithPointer;
            tChart1.Series.Add(TheSeries);
        }
    }
}
StillNoCalloutTailType.PNG
StillNoCalloutTailType.PNG (19.31 KiB) Viewed 11248 times

biqpaulson
Newbie
Newbie
Posts: 93
Joined: Thu Apr 17, 2008 12:00 am

Re: How to get normal callouts with Web theme.

Post by biqpaulson » Thu Mar 09, 2017 8:17 pm

Let me try and make this a little simpler.

I start with:
TypeIWant.PNG
TypeIWant.PNG (1.18 KiB) Viewed 11254 times
I add the "Web" theme and I get:
TypeIDoNotWant.PNG
TypeIDoNotWant.PNG (1.13 KiB) Viewed 11253 times
How do I get from:
TypeIDoNotWant.PNG
TypeIDoNotWant.PNG (1.13 KiB) Viewed 11253 times
Back to:
TypeIWant.PNG
TypeIWant.PNG (1.18 KiB) Viewed 11254 times

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: How to get normal callouts with Web theme.

Post by Christopher » Thu Mar 09, 2017 9:24 pm

Hello,

With the latest public version TeeChart.dll, the following code:

Code: Select all

    Pie series;
    private void InitializeChart()
    {
      series = new Pie(tChart1.Chart);
      series.FillSampleValues();

      tChart1.CurrentTheme = ThemeType.Web;

      series.Marks.Arrow.Visible = false;
      series.Marks.TailStyle = MarksTail.WithPointer;
    }
gives me this:
TChart636246912725529894.png
TChart636246912725529894.png (17.74 KiB) Viewed 11235 times
and:
phones.PNG
phones.PNG (10.36 KiB) Viewed 11236 times
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

biqpaulson
Newbie
Newbie
Posts: 93
Joined: Thu Apr 17, 2008 12:00 am

Re: How to get normal callouts with Web theme.

Post by biqpaulson » Thu Mar 09, 2017 10:20 pm

Looks like the order was also important. I had in my code:

Code: Select all

            TheSeries.Marks.Arrow.Visible = false;
            TheSeries.Marks.TailStyle = MarksTail.WithPointer;
            tChart1.Series.Add(TheSeries);
And it needed to be:

Code: Select all

            tChart1.Series.Add(TheSeries);
            TheSeries.Marks.Arrow.Visible = false;
            TheSeries.Marks.TailStyle = MarksTail.WithPointer;
Thanks!

Post Reply