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);