I have written a web application project that uses shape series (added to the chart at runtime). If I try to change the shape style (to any value even circle which it is by default). I get the following error.
[NullReferenceException: Object reference not set to an instance of an object.]
Steema.TeeChart.Styles.Shape.set_Style(ShapeStyles value) +14
This error occurred with version 1.1.1769.19457 as well as the latest version 1.1.1864.22788.
Have you seen this problem before?
Steve R
changing shapestyle causes null reference exception
Hi Steve,
using the following code works fine here :
using the following code works fine here :
Code: Select all
private void Button1_Click(object sender, System.EventArgs e)
{
(WebChart1.Chart.Series[0] as Steema.TeeChart.Styles.Shape).Style = Steema.TeeChart.Styles.ShapeStyles.Rectangle;
}
Pep Jorge
http://support.steema.com
http://support.steema.com
Hi Josep
I moved the line which sets the shape style so that it was after the series has been added to the chart. Now it works OK but shouldn't it be possible to set the style at any time? If the style is set before adding the series to the chart then the null reference exception still occurs (in web and windows forms).
Anyway, it's working now - thanks for your help.
Steve
I moved the line which sets the shape style so that it was after the series has been added to the chart. Now it works OK but shouldn't it be possible to set the style at any time? If the style is set before adding the series to the chart then the null reference exception still occurs (in web and windows forms).
Anyway, it's working now - thanks for your help.
Steve
The null reference exception is fixed but now I notice a different problem. If I change the shape style from the default then my series click event doesn't fire! I can see it cause the postback but it doesn't get to my click event. Removing the style change makes everything work OK again (except the shape style is wrong of course). Any ideas?
Steve
Steve
Hi Steve,
yes, you're correct, it's a known bug (already down our defect list), the OnClick event is not working for some shape styles. We'll try to fix it for the next maintenance releases.
yes, you're correct, it's a known bug (already down our defect list), the OnClick event is not working for some shape styles. We'll try to fix it for the next maintenance releases.
Pep Jorge
http://support.steema.com
http://support.steema.com