05.05.2011 I have released version 2.8.5. Read about it here
I have posted a new version of the “Charting for SharePoint using Google Visualization API” – v2.8. The changes are described here, but the background story and the code is found in original article. This post describes the new features.
1. Filter the chart using a choice column from the list
The dropdown is created from the choice options supplied in the list settings for that column. You set the filter in the GUI like this:
You must use “custom CAML” and select “Create a filter field above the chart using”. In the dropdown you will find all the single-choice columns in your list. Click on the text “Build CAML from selected filters” to create the appropriate CAML query.
2. Manually build the dropdown filter
If you want to make a dropdown filter for your chart, filtering by a text in a single line choice column you can create it like this. Click “Create a filter field above the chart using”, and select “manual filter setup”. You can then build the filter manually. See the description below the “filter options” textarea for formatting options for the dropdown.
When using a manual filter setup and using “Build CAML from selected filters”, you must change the “FieldInternalNameToMatch” with the proper FieldInternalName of your target field in the CAML. In this example, switch the text “FieldInternalNameToMatch” with “Region”.
3. Filter the chart using a value from the URL query string
4. Filter the chart by filtering the “attached” view
This only applies if the chart is in a page with a single list view. It reads the filter provided by the list filter action and filters the chart accordingly. There are no real connection between the list and the chart – it merely reads the URL and looks for a filter value matching the placeholder in the CAML.
Users upgrading from v2.7 must add three columns to the configuration list:
- UseCustomQueryFilter: Yes/No column (boolean)
- CustomQueryFilterField: Single line text
- CustomQueryFilterChoices: Multi line plain text
If a column name had “&” or “/” in it, the chart “broke”. Thanks to Eric Guy for finding the bug.
I might very well have forgotten something in this walktrough so please post any comment or question below.