Creating Graph with VB.NET, Part 2: Customize Chart

This entry is part 2 of 3 in the series Creating Graph with VB.NET

On Part 1: Basic Chart, I show how to create a basic chart with default chart type and color style. Now you will see how to customize chart by change those properties on a chart.

Sections

Sample chart

The sample chart that I use on this post has a series “Series1” which has 3 data points “10,20,30“.
Sample chart

Back to top

Customize chart type

There are many chart types that you can select for Chart control. On this example, I show some of those chart types which are Point, Line, Bar, Pie.

  1. On Chart Properties, click the Series collection. Then, click the ellipsis button.
    Chart Properties
  2. On Series Collection Editor, select “Series1” in the Members area and change the Chart type property to Point.
    Change Chart Type
  3. The Point chart type.
    Point Chart
  4. The Line chart type.
    Line Chart
  5. The Bar chart type.
    Bar Chart
  6. The Pie chart type.
    Pie Chart

Back to top

Customize Color style of chart

There are many color palettes that you can choose for Chart control. This section shows how to change color of Chart control.

  1. On Chart Properties, click on Palette property. You see a drop down button. Click on it and you can choose a color palette for your chart.
    Change Color Palette
  2. The example below is Bright color palette.
    Sample Chart

Back to top

Insert title to chart

This section shows how to insert title to Chart control.

  1. On Chart Properties, click the Title collection. Then, click the ellipsis button.
    Chart Properties
  2. On Title Collection Editor, click Add and set (Text) to “My Sample Chart” in the newly created Title object.
    Add Title
  3. Run the project. You will see a title on top of the chart.
    Sample Chart with title
  4. You can customize title’s text style, title position, title color on title properties.
    Title Properties

Back to top

3D chart

This section shows how to use three-dimensional (3D) chart areas in Chart control.

  1. On Chart Properties, click the ChartAreas collection. Then, click the ellipsis button.
    Open ChartArea Collection Editor
  2. On ChartArea Collection Editor, select “ChartArea1“. Expand Area3DStyle and change (Enable3D) to True.
    Note: You can customize your 3D Style on this Area3DStyle properties .
    Enable 3D Chart
  3. You see the chart is now 3D.
    Sample 3D Chart

Back to top

Series Navigation<< Creating Graph with VB.NET, Part 1: Basic ChartCreating Graph with VB.NET, Part 3: Data Binding Chart to Database >>

7 Comments

  1. Pict May 25, 2010
  2. Pict May 27, 2010
  3. Rhoda June 25, 2010
  4. Dignity June 14, 2011
  5. Michael January 9, 2012
  6. Sano February 5, 2013
  7. lua June 6, 2013

Leave a Reply

%d bloggers like this: