0

I have implemented graphs and drawn series using the following code

DotNet.Highcharts.HighCharts chart=new Highcharts.HighCharts("chart");
chart.SetSeries(new[] {new Series{Name="one",Data =new Data(new Object[,]{{0,0},{10,0.6},{20,0.5}})}});
chart.SetSeries(new[] {new Series{Name="two",Data =new Data(new Object[,]{{0,0},{12,0.8},{29,0.35}})}});

Now i at run time i want to add points when a button is clicked and the series name is choosen from the dropdown and values of x and y axis are given in textboxes. can'nt figure it out how to add points when addpoint button is clicked by the user.

asad rana
  • 13
  • 9

1 Answers1

0

Are we in MVC? If so then why not just add a bool parameter to the ActionResult method and on button click whether its an ActionLink etc pass the value as True to the Action, then conditional logic as to whether or not you load up an empty array of series data or you load up the one you say is already working?

Public ActionResult MyView(bool LoadData)
{
   if(LoadData)
   {
     //LOAD DATA
   } else
   {
    // Load blank data
   }
}

Maybe not the most elegant I must admit :)