Nevron Forum
Back
Login
Register
Login
Register
Home
»
Nevron Vision for NET
»
Nevron Chart for .NET
»
Accessing Shininess Property Causes Chart Objects to Appear White
Accessing Shininess Property Causes Chart Objects to Appear White
Post Reply
Accessing Shininess Property Causes Chart Objects to Appear White
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
Goto Topics Forum
Author
Message
Lance Levendowski
Lance Levendowski
posted 9 Years Ago
ANSWER
Topic Details
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
Reply
Like
0
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Threaded View
Threaded View
Accessing Shininess Property Causes Chart Objects to Appear White
Lance Levendowski
-
9 Years Ago
Hi Lance, The problem in this case is that the MaterialStyle is...
Nevron Support
-
9 Years Ago
Thank you for the feedback, but what should I set the Ambient,...
Lance Levendowski
-
9 Years Ago
Hi Lance, The ambient / diffuse colors must match the color of the...
Nevron Support
-
9 Years Ago
Post Reply
Similar Topics
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search