Click here to Skip to main content
15,891,905 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

Please i am currently developing an application where i have designated a button for changing the chart type. but after clicking the button, the chart image does not show. here is the code for changing chart type i used;


C#
Chart1.Series["Series1"].ChartType = SeriesChartType.Bar;


Also, i have designated a button for removing or showing the gridlines;

C#
Chart1.ChartAreas[0].AxisX.MajorGrid.Enabled = true;
            Chart1.ChartAreas[0].AxisY.MajorGrid.Enabled = true;

but still its not showing, please help me. Thanks
Chidi
Posted
Comments
V. 26-Aug-14 6:33am    
Before anyone can even attempt to help you, please give more details. What library are you using? Are you doing a postback. Is the library client or server side? Are you doing a redraw of the chart? is it giving an error message? What do you mean with it doesn't show? ...
Member 10920447 29-Aug-14 15:50pm    
Thanks, the library is server side. its an asp.net chart control. i used the above code to change the chart type under a button click event but after clicking the button the chart does not show anymore where as it was showing before the button was clicked. thanks.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900