3
Contributors
3
Replies
7
Views
6 Years
Discussion Span
Last Post by Vangi
0

hi,

thank you for reply. i am stucked here since last two days.

i have already downloaded this and have done with JS. but i want to apply it to asp.net .aspx.cs file.

i want to import through .dll that i can bind grid or some other control datra to it.means i want to bind server side data.

0

The best way to do this is by using DotNet.Highcharts library. You can build the Highchart entirely on the server side and there are a lot of samples including Pie charts.

Here is one of the samples:

Highcharts chart = new Highcharts("chart")
                .InitChart(new Chart { PlotShadow = false })
                .SetTitle(new Title { Text = "Browser market shares at a specific website, 2010" })
                .SetTooltip(new Tooltip { Formatter = "function() { return '<b>'+ this.point.name +'</b>: '+ this.percentage +' %'; }" })
                .SetPlotOptions(new PlotOptions
                                {
                                    Pie = new PlotOptionsPie
                                          {
                                              AllowPointSelect = true,
                                              Cursor = Cursors.Pointer,
                                              DataLabels = new PlotOptionsPieDataLabels
                                                           {
                                                               Color = ColorTranslator.FromHtml("#000000"),
                                                               ConnectorColor = ColorTranslator.FromHtml("#000000"),
                                                               Formatter = "function() { return '<b>'+ this.point.name +'</b>: '+ this.percentage +' %'; }"
                                                           }
                                          }
                                })
                .SetSeries(new Series
                           {
                               Type = ChartTypes.Pie,
                               Name = "Browser share",
                               Data = new Data(new object[]
                                               {
                                                   new object[] { "Firefox", 45.0 },
                                                   new object[] { "IE", 26.8 },
                                                   new Point
                                                   {
                                                       Name = "Chrome",
                                                       Y = 12.8,
                                                       Sliced = true,
                                                       Selected = true
                                                   },
                                                   new object[] { "Safari", 8.5 },
                                                   new object[] { "Opera", 6.2 },
                                                   new object[] { "Others", 0.7 }
                                               })
                           });
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.