Error when trying to reference DataPoint Class
Hi,
In a MSChart object I have a series with a lot of data points. So many, that the dashed border style does not work. I'm currently trying to draw custom dashed lines in an MSChart series with a solution I found here.
It seems like FastReport.DataVisualization.dll is a wrapper for System.Windows.Forms.DataVisualization. This is listed as a referenced assembly in Report > Options > Script. I included a namespace reference to FastReport.DataVisualization and FastReport.DataVisualization.Charting.
Despite this, when I try to access the DataPoints in a Series:
private void MyGetPointsMethod(Series series)
{
foreach(var dp in series.Points)
{
double dx = dp.XValue;
double dy = dp.YValue;
}
I get the following error message:
(44,24): Error CS1061: 'FastReport.DataVisualization.Charting.DataPoint' does not contain a definition for 'YValue' and no extension method 'YValue' accepting a first argument of type 'FastReport.DataVisualization.Charting.DataPoint' could be found (are you missing a using directive or an assembly reference?)
A reference to DataPoint should work as was posted here.
What am I missing here?
Comments
I found my mistake!
The correct property name is YValues and contains all values assigned to a DataPoint.