Click here to Skip to main content
11,576,993 members (60,200 online)
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 21:54pm
gwithey804
Edited 13-Dec-12 21: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 DamithSL 155
1 Sergey Alexandrovich Kryukov 131
2 OriginalGriff 115
3 Afzaal Ahmad Zeeshan 95
4 Abhinav S 90
0 OriginalGriff 820
1 Sergey Alexandrovich Kryukov 631
2 Abhinav S 528
3 F-ES Sitecore 420
4 Suvendu Shekhar Giri 365


Advertise | Privacy | Mobile
Web03 | 2.8.150603.1 | Last Updated 14 Dec 2012
Copyright © CodeProject, 1999-2015
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