Step 1: Set up the list as a data source
Create a web part list with this structure and data:
Step 2: Set up the chart
-
Add Dundas Chart for SharePoint to the page of the web site.
-
Click the arrow in top-right corner of web part area and choose Connect
To Data to run the Data Connection Wizard.
-
Select Get Data From Another Web Part and click Next.
-
Select a web part list from the Web Part dropdown list (in this case
it's List2) to use as data source and click Next.
-
Leave Data Formats as-is and click Next.
-
Add three series and set their columns from web part list for
X Field and Y Field as shown in the screen shots, then click Finish.
The chart bound to the data source is displayed on the page:
You can set the ShowLabelAsValue property
of all series to true to
show the values of all data points of the series:
-
Click the Advanced Properties link above the chart.
-
Click Series in the pane on the left side.
-
Select each series from the Series Menu drop-down list and set its
ShowLabelAsValue property to
true.
-
Click Finish to apply your changes.
Your chart should now look something like this:
As you can see, the chart is not generated correctly. To fix it,
continue with the next step.
Step 3: Align the data points by axis label
Run the Data Connection Wizard again, expand the Advanced Properties view
in Step 4: Bind Your Chart To Data, check the Align Data Points By Axis
Label check box and click Finish to apply your changes.
You should be able to see the correct chart:
Please note that this method is used to align data points from different
series along the X axis using their axis labels. Use it when:
-
Multiple series are being displayed and are indexed (i.e.
all points have an XValue of 0, or
Series.XValueIndexed is true).
-
All data points have non-empty axis labels, which are unique to their
series (otherwise an exception will be thrown).
This situation is very common when data-binding produces
multiple series and string values are being used for X axis values.
|