Hello,
I have a Line Chart and Series attached from a Datatable. When I have a NULL Value within a series and using
UltraChart1.LineChart.NullHandling = UltraChart.Shared.Styles.NullHandling.DontPlot
then it happens that the Datapoint before the Null value is not rendered.
Steps to reproduce:
Imports InfragisticsPublic Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim UltraChart1 As New Win.UltraWinChart.UltraChart UltraChart1.ChartType = UltraChart.Shared.Styles.ChartType.LineChart Dim LineAppearance01 As New UltraChart.Resources.Appearance.LineAppearance With LineAppearance01 .LineStyle.DrawStyle = UltraChart.Shared.Styles.LineDrawStyle.Solid .IconAppearance.Icon = UltraChart.Shared.Styles.SymbolIcon.Circle .IconAppearance.IconSize = UltraChart.Shared.Styles.SymbolIconSize.Large .Thickness = 3 .IconAppearance.PE.Fill = Color.MidnightBlue End With UltraChart1.LineChart.LineAppearances.Add(LineAppearance01) UltraChart1.LineChart.NullHandling = UltraChart.Shared.Styles.NullHandling.DontPlot Dim dt As New DataTable("Data") dt.Columns.Add("Col1", GetType(System.Double)) dt.Columns.Add("Col2", GetType(System.Double)) dt.Columns.Add("Col3", GetType(System.Double)) dt.Columns.Add("Col4", GetType(System.Double)) dt.Columns.Add("Col5", GetType(System.Double)) Dim dr As DataRow = dt.NewRow dr(0) = 8.0 dr(1) = DBNull.Value dr(2) = 15.5 dr(3) = 12.0 dr(4) = 11 dt.Rows.Add(dr) UltraChart1.DataSource = dt UltraChart1.DataBind() Me.Controls.Add(UltraChart1) End SubEnd Class
You see on the chart that the first datapoint [dr(0) = 8.0] is not on the chart.
Change
dr(0) = 8.0 dr(1) = DBNull.Value dr(2) = 15.5
To
dr(0) = 8.0 dr(1) = 15.5 dr(2) = DBNull.Value
and try again. Then it works as expected
I really need your help as my User do not trust anymore in the Application.
Thanks
A line chart requires two consecutive non-null values to draw a section of the line. Any single value surrounded by null values will not be plotted. The same would apply if the first value is followed by a null value. You can try using a scatter chart with ConnectWithLines property set to true, or using FillSceneGraph event to cusom draw an icon where a data point should be. It's not a feature of the line chart to draw a single point.
Hi,
thanks for your response.
Excel does exactly what my user expect. It draws a point where the data is. How to submit a feature request ?
Can you provide me with some information how to draw the point on myself ? how do I get the info which point is connected to a line and which point will not be draw ?
PS Im using Version 2008.1
A feature can be requested here:http://devcenter.infragistics.com/Protected/RequestFeature.aspx
As for custom drawing the point, there isn't a way to determine if a line is connected to a given point, but you can loop through your data and look for values followed by nulls and draw a Symbol primitive there.http://help.infragistics.com/Help/NetAdvantage/NET/2008.2/CLR2.0/html/Chart_Modify_Scene_Graph_Using_FillSceneGraph_Event.html
I used the following logic to draw a symbol for each value from the data table
private
when I draw this Symbol no ToolTip's are shown for this symbol.
How can I add the tooltip for these single point ?
Sorry for the delayed response. To add a tooltip to a custom Symbol you need to add the following to your FillSceneGraph event handler:s.Caps = PCaps.HitTest | PCaps.Tooltip;s.Layer = e.ChartCore.GetChartLayer();s.DataPoint = new NumericDataPoint(12345,"label",false);