Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# VB .NET Chart
Hi All,
 
I was wondering if anyone knows why a series would split across two x axis values when plotting a "Column" type.
 
The split occurs along the Y axis at 0. (Both positive and negative are shown)
 
<pre lang="vb">' Add series
    chartRun.Series.Add("Master")
    chartRun.Series("Master").ChartType = SeriesChartType.Column
    ' Set Column width as percentage of graph width
    chartRun.Series("Master")("PointWidth") = "0.005"
    chartRun.Series("Master").Color = Color.Gold
    chartRun.Series("Master").IsVisibleInLegend = False</pre>
 

The series is populated like this:
 
   If (mr.Mastered) Then
                chartRun.Series("Master").Points.AddXY(counter, YMin)
                chartRun.Series("Master").Points.AddXY(counter, YMax)
            End If
 
Even though "counter" may be 1 for example the bar splits across X values 1 and 2 on the chart.
 
Does anyone know how i can resolve this split to make just one vertical line spanning a range that is positive and negative across the Y Axis.
 
Alternatively if anyone knows another way of simply drawing a vertical line over a graph that spans both - and + values this would be perfect.
 
Thanks in advance
 
George
Posted 13-Dec-12 22:54pm
gwithey789
Edited 13-Dec-12 22:55pm
v3

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

  Print Answers RSS
0 OriginalGriff 240
1 Kamal Rocks 184
2 PIEBALDconsult 150
3 BillWoodruff 148
4 Jochen Arndt 135
0 OriginalGriff 5,695
1 DamithSL 4,506
2 Maciej Los 4,007
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,180


Advertise | Privacy | Mobile
Web01 | 2.8.141216.1 | Last Updated 14 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100