Display all data and filter the X axis labels in the Chart Web Part

Applies to: Nevron Chart for SharePoint (WSS3.0, SharePoint 2007/2010/2013)

How to display all data and filter the X axis labels in the Chart Web Part?

Let’s say that we have the sample data below. You may want to plot all the data but filter the X axis labels to only display labels for each Friday from the “Date” column (Date Time type). We can plot a cluster bar comparing the “Close” and “Volume” columns in time. In this example, there is great difference in the values (Close and Volume), this is why we have used secondary Y axis for better readability.

Following are step-by-step instructions to configure the chart and display labels on the X axis only for the Fridays:

From the Pivot tab, Data Groupings >> Categories >> General, we have created a new category and we have added three Group By expressions:

In the Data Groupings >> Categories >> Sorting, create three fields and use the following expressions (direction Ascending):

By using the following expression for the Label we, we will filter the X axis to display only labels for Fridays:
=IF( WEEKDAY(FIRST(Fields!Date))=5, FORMAT(FIRST(Fields!Date), "d", "en-GB"), "")

In the Data Groupings >> Values, we will have two values for “Close” and “Volume”:

For the second value, we have selected Display on Axes – Y Axes: Secondary Y (from Values >> General >> Options).
In the Chart >> Axes tab, select Secondary Y and go to the Range tab. Set Range Inflate, Inflate Mode to Tick.

Article ID: 199, Created On: 8/4/2011, Modified: 1/29/2013