I would like to set different markers to the various series plotted in my chart. How do I go about doing this since the various series are plotted only when the user selects that particular option. I currently have 7 series that can be plotted.
for (int i = 0; i <= loop - 1; i++) {
Chart1.Series[i].ChartType = System.Web.UI.DataVisualization.Charting.SeriesChartType.Line;
Chart1.Series[i].BorderWidth = 5; }
Whether it's System.Windows.Forms.DataVisualization.Charting.MarkerStyle or System.Web.UI.DataVisualization.Charting.MarkerStyle you can set it:
DataPointCollection
. Series
( DataPointCustomProperties.MarkerStyle ). If you are using MarkerStyle.None
you can also use a MarkerImage
instead of the default predefined markers, same remarks as above, it should work for the whole series or any point. You can even manipulate those values directly with DataPointCustomProperties.SetCustomProperty , or DeleteCustomProperty , like:
dataPoint.SetCustomProperty("MarkerStyle", MarkerStyle.Circle);
or
dataPoint.DeleteCustomProperty("MarkerStyle");
Then, make sure:
MarkerSize
property so that your points are visible.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.