Step 3 of 5: Customizing the Scatter Chart Elements
In This Topic
In this topic you will customize the color for the Series using the Fill property , text for the Header and X-Axis using the Text property, and the stroke style for the gridmajor, tickmajor, and tickminor elements using the Stroke property.
- In Design view select the C1ScatterChart and select SeriesStyles from its tasks menu. The ChartStyle Collection Editor appears.
- Click Add. A new ChartStyle member is added.
- Expand the Fill node and set the Color to #AFE500.
- Set the Stroke property to #AFE500.
- Click Add. A second ChartStyle member is added.
- Expand the Fill node and set the Color to #FF9900.
- Set the Stroke property to #FF9900.
- In Source View your source code for the new ChartStyles should appear like the following:
To write code in Source View
<SeriesStyles>
<cc1:ChartStyle Stroke="#AFE500">
<Fill Color="#AFE500">
</Fill>
</cc1:ChartStyle>
<cc1:ChartStyle Stroke="#FF9900">
<Fill Color="#FF9900">
</Fill>
</cc1:ChartStyle>
</SeriesStyles>
- In Design View expand Header and set the Text property to Height Versus Weight of 507 Individuals by Gender and expand the TextStyle and set the FontSize to 18. The header appears directly above the chart area, but can be moved to a different position using the Compass property.
- Expand the Axis->X and set the Text property to Height (cm).
- Expand the Axis->X->-Labels->AxisLabelStyle set the FontSize property to 11pt. This will change the font size for the axis x label to 11points. Also set the Rotation property to -45 and Fill Color to #7F7F7F.
- Expand the Axis->X->TickMajor and set the Position property to Outside. This will change the position of the x-axis to outside.
- Expand the Axis->Y and set the Text property to Weight (kg).
- Expand the Axis->Y>->Labels->AxisLabelStyle set the FontSize property to 11pt. This will change the font size for the axis y label to 11points. Also set the Visible property to False and TextAlign to Centerand Fill Color to #7F7F7F.
- Expand the Axis->Y>GridMajor->GridStyle and set the Stroke property to #353539.
- Expand the Axis->Y->TickMajor and set the Position property to Outside. This will change the position of the x-axis to outside.
- Expand the Axis->Y>TickMajor->TickStyle and set the Stroke property to #7F7F7F.
- Expand the Axis->Y->TickMinor and set the Position property to Outside. This will change the position of the x-axis to outside.
- Expand the Axis->Y->TickMinor->TickStyle and set the Stroke property to #7F7F7F.
See Also