2

I've been working with javascript Highcharts and I made a basic 'Chart Builder' app. One of my goals is to have the user create and modify as many options as they like and save those to the db. The main problem I'm having is trying to convert the Highcharts object to a c# class. I've been building it slowly(ie manually) with the parts I need, as I need them, but to eventually get the whole thing converted will take a long time.

Ideally, I'd like to create and setup the whole highcharts options object server side and just send it 100% complete to highcharts

Is there any easy way to do this? Has anyone already done this?

Here is the Highcharts reference page: http://www.highcharts.com/ref/

and this is what I've done so far.

public class Highchart
{
    public title title { get; set; }
    public plotOptions plotOptions { get; set; }
}

public class title
{
    public string text { get; set; }
}

public class plotOptions
{
    public series series { get; set; }
}

public class series
{
    public string stacking { get; set; }
    public string borderColor { get; set; }
    public bool shadow { get; set; }
    public int borderWidth { get; set; }
}

As you can see, I just started ^_^

6
  • There is not going to be an option to just convert JavaScript to C#, I'm afraid. Commented Sep 2, 2011 at 17:37
  • I hope someone's already done it then! Commented Sep 2, 2011 at 17:38
  • Class names should never be lowercase. You are just asking to confuse your future self between fields/variables and classes. Commented Sep 2, 2011 at 17:41
  • I want it to match the documentation as much as possible :( Commented Sep 2, 2011 at 17:45
  • 1
    Have a look at Highcharts.net at highcharts.codeplex.com, the project has not been updated since Feb 8 and I haven't tried it myself but maybe you could get some inspiration from it Commented Sep 3, 2011 at 15:38

1 Answer 1

2

Update : The Highcharts .Net library has been updated in December, and is nearly feature complete as per V2.1.9 of the Javascript library.

The .Net library currently has support for multiple axes, point objects, viewstate management after postbacks, click events for points, series etc, and a built in implementation of an AJAX datasource ;) You don't need to write a single line of JS code unless you want to handle click events; you simply code in C#, and the appropriate JS is rendered automatically for you..

Click here to view the Live Demo

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.