Accessing Shininess Property Causes Chart Objects to Appear White


Accessing Shininess Property Causes Chart Objects to Appear White
Author
Message
Lance Levendowski
Lance Levendowski
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
Posts: 60, Visits: 157
Getting or setting a series' FillStyle.MaterialStyle.Shininess property causes all of the bars to appear white, regardless of whether we change the property's value.

Is there any way to prevent this behavior?

See the following example:
Public Class ChartForm
  Inherits Windows.Forms.Form

  Public Sub New()
    Dim series1 As New Nevron.Chart.NBarSeries
    series1.BarShape = Nevron.Chart.BarShape.SmoothEdgeBar
    series1.HasBottomEdge = 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))

    'BUG: Getting or setting a series' FillStyle.MaterialStyle.Shininess property causes all of the bars to appear white, regardless of whether we change the property's value.
    ' NOTE: If you comment out the following line then the bars appear to have the appropriate color.
    Dim currentShininess As Single = series1.FillStyle.MaterialStyle.Shininess
    'series1.FillStyle.MaterialStyle.Shininess = series1.FillStyle.MaterialStyle.Shininess

    Dim chart As New Nevron.Chart.NCartesianChart
    chart.Enable3D = True
    chart.Series.Add(series1)

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

    chartControl.Controller.Tools.Clear()
    chartControl.Controller.Tools.Add(New Nevron.Chart.Windows.NTrackballTool())
    chartControl.Controller.Selection.Clear()
    chartControl.Controller.Selection.Add(chart)

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

End Class

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search