vb.net - Get color of a chart series -
i need color of series set smart lables, want make cell in dgv same color.
dim chtcolor(50) color each cur in mcurves ptang = estcurve(cur, bladeangle, hrfan) me.chtcurves.series.add(cur.tostring) me.chtcurves.series(cur.tostring).charttype = datavisualization.charting.seriescharttype.spline me.chtcurves.chartareas(0).axisx.labelstyle.format = "#.###" chtcolor(i) = me.chtcurves.series(cur.tostring).color
the function me.chtcurves.series(cur.tostring).color
returning list of colors , not series color.
if not explicitly setting series color , want retrieve default assigned color, must call chart.applypalettecolors()
.
modify code call method after adding series chart's series collection
me.chtcurves.series.add(cur.tostring) me.chtcurves.series(cur.tostring).charttype = datavisualization.charting.seriescharttype.spline me.chtcurves.chartareas(0).axisx.labelstyle.format = "#.###" me.chtcurves.applypalettecolors() ' allow retrieve default color chtcolor(i) = me.chtcurves.series(cur.tostring).color
Comments
Post a Comment