i have 2 charts on a panel. one is a regular cartesian chart (typical X/Y axes), the other is a polar chart. i'm writing a common function to reset the charts by using the double-click event handler. one of the parameters on the event handler is sender. if i cast this like this ... Steema.TeeChart.TChart tTempChart = sender as Steema.TeeChart.TChart, i do get the "pointer" to the correct chart.
at the moment, i can check the max x value to see if it's 360 ... Math.Round(tTempChart[0].MaxXValue()==360 ... but i'd like to be able to check a parameter to see if the chart style is Polar or Cartesian. how can i do this?
thanks,
pete.
TeeChart style determination
Re: TeeChart style determination
after a lot of interactive "immediate window" queries, i think i may have answered my own question.
if (tTempChart[0].GetType().Name=="PolarBar")
{
// this is a polar chart
}
else
{
// this is a cartesian chart ... GetType().Name equals "Points"
}
if (tTempChart[0].GetType().Name=="PolarBar")
{
// this is a polar chart
}
else
{
// this is a cartesian chart ... GetType().Name equals "Points"
}
Re: TeeChart style determination
Hello Pete,
GetType. Name is a valid solution to check which series are you using. Other option as you can use is work directly with type of Series as do in next line of code:
I hope will helps.
Thanks,
GetType. Name is a valid solution to check which series are you using. Other option as you can use is work directly with type of Series as do in next line of code:
Code: Select all
if (tChart1[0] is Steema.TeeChart.WPF.Styles.PolarBar)
{
}
Thanks,
Best Regards,
Sandra Pazos / 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 |