The LineStyle and SymbolStyle properties of the ChartDataSeries allow display aspects of each series to be perfected. Not limited to only the lines or symbols of a series line, these properties can change the color of a Pie chart slice, change the color of a Radar chart series, or set the width of a HiLo chart series.
The LineStyle property contains the Color, Pattern, Thickness, LineJoin, and MiterLimit properties. Generally these properties set the color, pattern, joining style, miter limit of the joints of the drawn line, and thickness attributes for a lines of a series.
The SymbolStyle property contains the Color, Pattern, and Thickness properties. Generally these properties set the color, patter, and thickness attributes for the symbols of a series.
Below is a table that lists how these two properties affect each chart type. Notice that for some chart types these properties have no effect, and for others these properties set the attributes for something other than a line or a symbol:
Value | Effect for LineStyle Property | Effect for SymbolStyle Property |
---|---|---|
Chart2DTypeEnum.XYPlot | Changes Color, Thickness, and Pattern of the line that connects data points. | Changes Series Symbol Style. |
Chart2DTypeEnum.Pie | Changes the BackColor of the series (piece). | No effect. |
Chart2DTypeEnum.Bar | Changes the BackColor of the series. | No effect. |
Chart2DTypeEnum.Area | Changes the BackColor of the series. | No effect. |
Chart2DTypeEnum.Polar | Changes the BackColor, Pattern, and Thickness for Series Line. | Changes the Series Symbol Style, BackColor, and Thickness. |
Chart2DTypeEnum.Radar | Changes the BackColor, Pattern, and Thickness for the Series Line. | Changes the Series Symbol Style, BackColor, and Thickness. |
Chart2DTypeEnum.HiLo | Changes the BackColor, Style, and Thickness for the Series Line. | No effect. |
Chart2DTypeEnum.HiLoOpenClose | Changes the BackColor, Style, and Thickness for the Series Line. | No effect. |
Chart2DTypeEnum.Candle | Changes the BackColor for falling stock prices, and the thickness of the candle. | Changes the BackColor for rising stock prices and the thickness of the candle. |
A more elaborate method of styling the plot involves the use of a brush instead of only color as specified by the LineStyle and SymbolStyle properties. A brush can provide a richer, more unique appearance than just color -- including hatching, gradients and textures. For more information about using brushes, see Custom Brushes for Plotting Data.