This project is read-only.

ChartClickEvent with MVC

Jun 7, 2012 at 10:13 PM

Great project. I have a fully working chart app in a couple of days. I have one small issue.

I am using dotnet.highcharts with ASP.NET MVC 3.

I have two working pieces.

I have a working chart and a working page at signup/signup.

I want the signup/signup page to show when I click on the body of the chart.

The chart

       Highcharts chart = new Highcharts("chart")
                .InitChart(new DotNet.Highcharts.Options.Chart
                    DefaultSeriesType = ChartTypes.Column,
                    Width = width,
                    Height = height,
                    Events = new ChartEvents { Click = "ChartClickEvent" }
                .AddJavascripFunction("ChartClickEvent", @"$.get('signup/signup')")
                .SetCredits(new Credits { Enabled = false })
                .SetTitle(new Title { Text = "Sign ups" })

The ChartClickEvent is working. The server side controller and view code is executed when I click on the chart. I can step through it.

BUT - The browser does not display the signup page however.

I feel I am missing something simple.

Any ideas? TIA

Jun 9, 2012 at 1:12 AM

OK - solved - use window.location = "signup/signup"  - this sorted out my issue.

Marked as answer by Vangi on 10/24/2013 at 6:27 AM