user1340173
user1340173

Reputation:

Add additional data to point using DotNet.Highcharts

I am learning how to use HighCharts with Visual Studio. I am using DotNet.Highcharts to hopfully make it easier. I have a series with the y value of totalAttempts which is and integer and the x value of DateTime. The series is a spline chart. I would like to add additional data.

How can I add additional data to each point using DotNet.Highcharts?

UPDATE

I have a Series List that I use to add all of the needed Series to:

List<Series> mySeries = new List<Series>();

I use an array list to hold each of the data points needed

var myResults = new List<object[]>();

Then I loop through the results of a query several time to gather the data for each point of a Series. Here is the code I use:

myResults.Add(new object[] 
{ 
        detailRecords.groupedDate, //represents x
        detailRecords.totalAttempts //represents y
});

Then after the data points are all created, I then add the array list as the data for a Series

mySeries.Add(new Series
{
    Name = mainRecords.name,
    Data = new Data(myResults.ToArray())
});

What I don't know how to do is add additional information to the data points so I can display it when it is hovered over. The question Set Additional Data to highcharts series shows how to do this but I can't seem to get it working with DotNet.Highcharts.

Upvotes: 4

Views: 1371

Answers (1)

Vangi
Vangi

Reputation: 724

At the moment it's not possible to add such kind of additional data by using DotNet.Highcharts. But this is a good feature and it will be included at the next releases of the library.

Upvotes: 3

Related Questions