Profile Picture

NPointSeries set specific color

Posted By Ignacio Mendiguren 11 Years Ago
Author
Message
Ignacio Mendiguren
Posted 11 Years Ago
View Quick Profile
Junior Member

Junior Member (20 reputation)Junior Member (20 reputation)Junior Member (20 reputation)Junior Member (20 reputation)Junior Member (20 reputation)Junior Member (20 reputation)Junior Member (20 reputation)Junior Member (20 reputation)Junior Member (20 reputation)

Group: Forum Members
Last Active: 11 Years Ago
Posts: 20, Visits: 1
Perfect, many thanks!

Ignacio

Nevron Support
Posted 11 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009

Hi Ignacio,

You need to touch the FillStyles collection of the point series, whcih allows you to specify fill style per data point - for example:

  Dim chart As NChart = NChartControl1.Charts(0)
  chart.Enable3D = True
  Dim point As NPointSeries = CType(NChartControl1.Charts(0).Series.Add(SeriesType.Point), NPointSeries)

  point.InflateMargins = True

  point.AddDataPoint(New NDataPoint(10, 20, 30, "MyLabel1"))
  point.FillStyles.Add(0, New NColorFillStyle(Color.Red))

  point.AddDataPoint(New NDataPoint(20, 30, 40, "MyLabel2"))
  point.FillStyles.Add(1, New NColorFillStyle(Color.Blue))

  point.DataLabelStyle.Visible = False
  point.UseXValues = True
  point.UseZValues = True

Let us know if you meet any probelms...



Best Regards,
Nevron Support Team



Ignacio Mendiguren
Posted 11 Years Ago
View Quick Profile
Junior Member

Junior Member (20 reputation)Junior Member (20 reputation)Junior Member (20 reputation)Junior Member (20 reputation)Junior Member (20 reputation)Junior Member (20 reputation)Junior Member (20 reputation)Junior Member (20 reputation)Junior Member (20 reputation)

Group: Forum Members
Last Active: 11 Years Ago
Posts: 20, Visits: 1
Hi,

I am loading a chart with data by doing:

For iIndex as integer =0 to 10
m_Point = CType(NChartControl_1D.Charts(0).Series.Add(SeriesType.Point), NPointSeries)
m_Point.InflateMargins = True
m_Point.AddDataPoint(New NDataPoint(myX, myY, myZ, myLabel))
m_Point.DataLabelStyle.Visible = False
m_Point.UseXValues = True
m_Point.UseZValues = True
next


Is there a way to assign a specific color to each m_Point I am creating. I need to assign a specific color to each one, automatic colors are not valid in my case.

Thanks,

Ignacio



Similar Topics


Reading This Topic