This project is read-only.

How to create a scatter graph using Highchart.Net

Mar 15, 2012 at 7:02 PM

Bye, I'm using the HighChart.Net component to create a scatter chart in my application, but I don't know how to do it.

What is the correct syntax? Where can I find an example of a scatter chart created with component highcharts.NET?


Mar 16, 2012 at 4:53 AM
Edited Mar 16, 2012 at 4:54 AM

You simply create an instance of the scatter chart in stead of a line/area chart using <Highchart:ScatterChart runat ="server" ID=... > </Highchart:ScatterChart>

For individual Series, you can also set  <serie>.type = RenderType.scatter property to get the desired effect.

Hope this helps..



Mar 21, 2012 at 11:26 PM

Hi Rahul, thanks for the help.

I have successfully created the scatter chart with one series using static values​​. Now I'd like to pass values ​​dynamically creating multiple series.

I have data stored in a SQL database in the form of data-value (ex. column1: dd/mm/aaaa and column2: float value) and I would like to show in the chart by putting the year on the horizontal axis and value on the ordinate.

I retrieved the data through a dataset and I tried to build the series using the Collection<Serie> with the Add method but does not work. I read in other discussions that I can use the PointCollection class but I don't know how to do it. 

Could you help me with some example?



Mar 30, 2012 at 3:22 PM

Hi stevec80,

I have added an example in the latest changeset (19086) (Sample10.aspx) that deals with pulling data from a DataTable and using a PointCollection instead of a simple y-value.

Please try it and let us know if it works for you.