Profile Picture

HasBottomEdge and HasTopEdge Behavior is Flipped in 2D Mode

Posted By Lance Levendowski 8 Years Ago

HasBottomEdge and HasTopEdge Behavior is Flipped in 2D Mode

Author
Message
Lance Levendowski
Posted 8 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)

Group: Forum Members
Last Active: 6 Months Ago
Posts: 60, Visits: 157
Setting NBarSeries.BarShape = SmoothEdgeBar and NBarSeries.HasBottomEdge = False causes the top to be flat and the bottom to be rounded when NCartesianChart.Enable3D = False.
Similarly, setting NBarSeries.BarShape = SmoothEdgeBar and NBarSeries.HasTopEdge = False causes the bottom to be flat and the top to be rounded when NCartesianChart.Enable3D = False.
If NCartesianChart.Enable3D = True then the bars have rounded tops and flat bottoms as expected.

Is there a fix (other than swapping the values when NCartesianChart.Enable3D = False)?

See example:
Public Class HasBottomEdgeForm
  Inherits Windows.Forms.Form

  Public Sub New()
    Dim series1 As New Nevron.Chart.NBarSeries

    'ISSUE: Setting NBarSeries.BarShape = SmoothEdgeBar and NBarSeries.HasBottomEdge = False causes the top to be flat and the bottom to be rounded when NCartesianChart.Enable3D = False.
    ' Similarly, setting NBarSeries.BarShape = SmoothEdgeBar and NBarSeries.HasTopEdge = False causes the bottom to be flat and the top to be rounded when NCartesianChart.Enable3D = False.
    ' NOTE: If NCartesianChart.Enable3D = True then the bars have rounded tops and flat bottoms as expected.
    series1.BarShape = Nevron.Chart.BarShape.SmoothEdgeBar
    series1.HasBottomEdge = False
    'series1.HasTopEdge = False

    series1.AddDataPoint(New Nevron.Chart.NDataPoint(3))
    series1.AddDataPoint(New Nevron.Chart.NDataPoint(1))
    series1.AddDataPoint(New Nevron.Chart.NDataPoint(2))
    series1.AddDataPoint(New Nevron.Chart.NDataPoint(5))
    series1.AddDataPoint(New Nevron.Chart.NDataPoint(4))

    Dim chart As New Nevron.Chart.NCartesianChart
    'NOTE: If you change the following line to chart.Enable3D = True then the bars appear to have the appropriate shape.
    chart.Enable3D = False
    chart.Series.Add(series1)

    Dim chartControl As New Nevron.Chart.WinForm.NChartControl
    chartControl.Charts.Clear()
    chartControl.Charts.Add(chart)
    chartControl.Dock = DockStyle.Fill

    Me.Size = New Drawing.Size(800, 600)
    Me.StartPosition = FormStartPosition.CenterScreen
    Me.Controls.Add(chartControl)
  End Sub

End Class






Similar Topics


Reading This Topic