Profile Picture

Empty Data Points and its presentation on a line chart

Posted By Tim Strong 13 Years Ago
Author
Message
Tim Strong
Posted 13 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: Forum Members
Last Active: 13 Years Ago
Posts: 4, Visits: 1

Hello,

We have a chart of line SeriersTypeLine.  We have some data value of DBNull and we want to present on the this line chart.  We does according to the document on how to handle the empty DATA point.  But we only have gap on the chart line for DBNUll value instead of the empty point representation which we define for empy points.  We need help about what is the correct approach for this:

Following are part of codes on how we do this:

=====================================================

Nevron.Chart.NLineSeriesBase mySeries = (Nevron.Chart.NLineSeries)myChart.Series.Add(Nevron.Chart.SeriesType.Line);

Nevron.Chart.NEmptyDataPointsAppearance edpAppearance = mySeries.EmptyDataPointsAppearance;

edpAppearance.MarkerMode = Nevron.Chart.EmptyDataPointsMarkerMode.Special;

edpAppearance.MarkerStyle.PointShape = Nevron.Chart.PointShape.Cross;

edpAppearance.MarkerStyle.FillStyle = new Nevron.GraphicsCore.NColorFillStyle(System.Drawing.Color.Black);

mySeries.XValues.FillFromDataTable(myTable, "TimeStamp");

mySeries.Values.FillFromDataTable(myTable, "Value");

==================================================================

We have some DBNUll for some rows of myTable "Value" column.  We want to show on this line chart that data is null at some time point ("TimeStamp" column)

Thanks.

 

Thid is a web application and we are doing this with Nevron.Chart.Webform ()

When we set a break point, we do notice following:

mySeries.Values.EmptyDataPoints are set in  following values:

mySeries.Values.EmptyDataPoints.ValueMode = Nevron.Chart.EmptyDataPointsValueMode.Skip;

mySeries.Values.EmptyDataPoints.CustomValue = 0.0;

mySeries.Values.EmptyDataPoints.Label = "";

Question: does this effect emptyDataPoint presentation?  If it does, what is the correct approach?

 

 



Nevron Support
Posted 13 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009
Hello Tim,

In order to display an empty data point the chart control internally has to replace the "empty" values with some displayable values. The following code:

mySeries.Values.EmptyDataPoints.ValueMode = Nevron.Chart.EmptyDataPointsValueMode.Skip;

means that the control does not replace the "empty" values and they cannot be displayed.

There are two options:

1. Each "empty" value can be replaced with the average of its neighbor values. For this option you have to set the ValueMode property to EmptyDataPointsValueMode.Average.

2. All empty values can be replaced with a custom constant value. For this option you have to use EmptyDataPointsValueMode.CustomValue and set the CustomValue property to some value.



Best Regards,
Nevron Support Team



Tim Strong
Posted 13 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: Forum Members
Last Active: 13 Years Ago
Posts: 4, Visits: 1

Hello,

Thanks for the suggested solution:

Now we do not see gap and have the color which we define for the null value after modifying the codes in follow way:

===================================================

Nevron.Chart.NEmptyDataPointsAppearance edpAppearance = mySeries.EmptyDataPointsAppearance;

 

edpAppearance.AppearanceMode = Nevron.Chart.EmptyDataPointsAppearanceMode.Special;

edpAppearance.MarkerMode = Nevron.Chart.EmptyDataPointsMarkerMode.Special;

edpAppearance.MarkerStyle.PointShape = Nevron.Chart.PointShape.Pyramid;

edpAppearance.FillStyle = new Nevron.GraphicsCore.NColorFillStyle(System.Drawing.Color.Navy);

edpAppearance.MarkerStyle.FillStyle = new Nevron.GraphicsCore.NColorFillStyle(System.Drawing.Color.Navy);

edpAppearance.MarkerStyle.Visible = true;

mySeries.Values.EmptyDataPoints.ValueMode = Nevron.Chart.EmptyDataPointsValueMode.CustomValue;

 

 

mySeries.EmptyDataPointsAppearance.MarkerStyle.Width = new Nevron.GraphicsCore.NLength(2f, Nevron.GraphicsCore.NRelativeUnit.ParentPercentage);

mySeries.EmptyDataPointsAppearance.MarkerStyle.Depth = new Nevron.GraphicsCore.NLength(2f, Nevron.GraphicsCore.NRelativeUnit.ParentPercentage);

mySeries.EmptyDataPointsAppearance.MarkerStyle.Height = new Nevron.GraphicsCore.NLength(2f, Nevron.GraphicsCore.NRelativeUnit.ParentPercentage);

mySeries.EmptyDataPointsAppearance.MarkerStyle.AutoDepth = true;

 

=================================================

But we still do not see pointshape (Pyramid as we define here) for  null values.

What code should we modify here so that PointShapes (Pyramid) show up for null values

 



Nevron Support
Posted 13 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009
We just tested this and EDP markers are displayed, but it looks like the marker size is not computed properly. This problem is fixed in the upcoming release, so probably it is best to just wait for the new version.

Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic