c# - ZedGraph: Won't work under button click event -
i windows forms project in vs2012 zedgraph control , button. have following code:
double[] testing = { 0, 1, 2, 3, 4, 5 }; lineitem myline = zedgraphcontrol1.graphpane.addcurve("testing", testing, testing, color.red); zedgraphcontrol1.axischange();
when have under form_load event, line chart generated should be. if move code under button click event, nothing happens. have blank graph.
i've made sure event firing , when under graphpane.curvelist there curve expected values.
can suggest reason why might happening?
maybe have solution problem. have tried solve , solution simple. @ end of code try add :
double[] testing = { 0, 1, 2, 3, 4, 5 }; lineitem myline = zedgraphcontrol1.graphpane.addcurve("testing", testing, testing, color.red); zedgraphcontrol1.axischange(); zedgraphcontrol1.refresh()
but make changes after button clicking. styling have write code in form_load or in sub.
Comments
Post a Comment