开发者

javascript Highcharts object as a C# class

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 highchar开发者_运维知识库ts

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 ^_^


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜