Click here to Skip to main content
15,897,226 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am using EPPlus to generate an Excel using C#.

My Requirement

I need to give a custom label for the dataPoints plotted in my scatter chart. By default - on hover of a datapoint on the chart it shows only the X-Axis and Y-Axis Value.

Along with X\Y Axis I would need to include a data for TimeReceived. This data will be available on the Excel columns.

Excel columns : X Value, Y Value , TimeReceived


Please share your suggestions on this.

What I have tried:

My Current Code

var scatterChart = 
    workSheet.Drawings.AddChart("scatterChart", eChartType.XYScatterLines) as ExcelScatterChart;

scatterChart.Title.Text = GraphTitle;
var rangeLabel = workSheet.Cells["D2:D2571"];
var range1 = workSheet.Cells["C2:C2571"];

scatterChart.Series.Add(range1, rangeLabel);

scatterChart.Series[0].Header = workSheet.Cells["A1"].Value.ToString();
scatterChart.Legend.Position = eLegendPosition.Right;
scatterChart.SetSize(600, 300);

scatterChart.SetPosition(5, 0, 1, 0);
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900