Share via


How to: Style a Chart Element (Visual Studio Report Designer)

Chart styles can be enhanced by modifying the line style and fill color of chart elements. You can also use expressions to control chart styles. You can change the appearance of the plot and chart areas, the x-axis and y-axis, and the legend in a chart. You can also apply a three-dimensional effect to the chart. The gradient plot area fill does not appear when the three-dimensional effect is applied. If you use a font size larger than 10 pt in the chart legend, some legend labels may be truncated. This may only be visible in larger font sizes.

To style a chart element

  1. Open a client-side report definition (.rdlc) file in graphical design mode.

  2. Right-click the chart, and then click Properties.

  3. On the Data tab, in Values, select the value to edit, and then click Edit. If there is only one value series in the chart, select [Value].

  4. On the Border and Line tab, select the line style, width, and color. To use an expression, click the Expression (fx) button next to the desired option.

  5. On the Fill tab, select the color, gradient, and gradient end color. To use an expression, click the Expression (fx) button next to the desired option.

    Providing a static value causes all chart elements for that value series to display using the same style. For example, selecting Red for the fill color causes all bars to become red, overriding the automatic color assignment from the chart palette. To provide different styles based on fields or other values, use an expression. If you use an expression for fill color, the chart elements will be white in Layout view but will display properly when the report is run.

    Using a fill color of Transparent causes the chart elements to display using the automatic color assignment from the chart palette.

See Also

Concepts

Adding Charts to a Report (Visual Studio Report Designer)