Jqplotchart format | |
---|---|
Displays aggregated numerical data as a bar, line, pie, or donut chart | |
Scenarios, examples, demos | |
Example: | Category:Jqplotchart examples |
Collection | |
Further Information | |
Provided by: | Extension "Semantic Result Formats" |
Added: | 1.8.0 |
Removed: | still supported |
Requirements: | none |
Format name: | jqplotchart |
Enabled? Indicates whether the result format is enabled by default upon installation of the respective extension. | Yes |
Authors: | James Hong Kong |
Categories: | charts |
Group: | jqPlot , data visualization |
Table of Contents | |
The result format jqplotchart, displays aggregated numerical data as a bar, line, pie, or donut chart.
It is using the jqPlot Javascript library and starting with SRF 1.8, jqplotbar and jqplotpie have been merged into one class called jqplotchart which will handle all standard tasks that earlier jqplotbar and jqplotpie have managed. For compatibility reasons the format name jqplotbar and jqplotpie will still be available as aliases but point to format jqplotchart where the bar chart is set as default chart. Other chart layouts are available by using parameter ['layout'] which introduces two additional layouts, a line and a donut chart layout.
The change tried to accommodate compatibility as best as possible but some parameters have been either renamed or altered in their usage pattern to ensure similar behaviour across all layouts and in both classes ( jqplotchart and jqplotseries).
Parameters[edit]
Parameter | Type | Default | Description |
---|---|---|---|
distribution | yes/no | no | Instead of displaying all values, count their occurrences, and show these. |
distributionsort | text | none | Sort the value distribution by occurrence count. |
distributionlimit | whole number | no | Limit the value distribution to the count of only some values. |
aggregation | text | subject | Specify to what the aggregation should relate to |
min | whole number | no | The minimum value to show on the Y-axis |
direction | text | vertical | Specify the direction of a chart or graph |
charttitle | text | empty | The title of the chart |
charttext | text | empty | Descriptive chart text |
numbersaxislabel | text | empty | The label for the numbers axis |
labelaxislabel | text | empty | The label for the label axis |
height | whole number | 400 | Specify the height (in pixels) of a chart or graph |
width | text | 100% | Specify the width (in pixels or percent) of a chart or graph |
smoothlines | yes/no | no | Apply a smoothing algorithm on line charts |
valueformat | text | %d | Specify formatting rule for values |
ticklabels | yes/no | yes | Enable display of tick labels |
highlighter | yes/no | no | Display a data point highlighter |
theme | text | empty | Select a grid theme |
filling | yes/no | yes | Individual filling option |
chartlegend | text | none | Chart legend position |
datalabels | text | none | Chart/graph data labels |
colorscheme | text | empty | Select a color scheme |
chartcolor | text | empty | Assign individual chart colors |
class | text | empty | Specify an additional cascading style sheet class |
charttype | text | bar | Available chart type |
Parameter values[edit]
As a list of values cannot be listed yet (see also here), here are some options what parameter values can be chosen, e.g. direction=horizontal
.
- direction: vertical, horizontal
- charttype: bar, donut, line, pie
- datalabels: none, value, label, percent
Changes deployed with SRF 1.8[edit]
- Added donut and line chart layout
- Added parameter [class], allows to add CSS characteristics
- Added parameter [charttext], a text field for an explanatory chart text
- Added parameter [smoothlines], applies a smoothing algorithm (only applied to the line chart)
- Added parameter [theme], a basic theming support for commonly styled attributes (vector, simple)
- Added parameter [colorscheme], option for an easy selection of pre-defined colours schemes
- Added parameter [datalabels], displays individual data as ( 'none', 'value', 'label', 'percent')
- Changed parameter [bardirection] to [direction] to accommodate overall changes
Examples[edit]
- Displaying numerical distributions
- Jqplotchart/Aggregatable bar charts
- Jqplotchart/Aggregatable city data
- Jqplotchart/Distributable data
- Jqplotchart/Embedded charts and text
- Jqplotchart/Population
- Jqplotchart/Simple bar chart specifies chart colors
- Jqplotchart/Simple bar chart to display horizontal and vertical direction
- Jqplotchart/Simple bar chart to use label sorting
- Jqplotchart/Simple donut chart
- Jqplotchart/Simple line chart
- Jqplotchart/Simple pie chart
- Jqplotchart/Simple pie chart specifies chart colors
No best practices assigned to this printer.
Distribution[edit]
The value distribution is supported as well with jqplotchart as it was with jqplotbar and jqplotpie.
Notes[edit]
Reasons for the re-factoring effort was to ensure that the jqplot printer and its JavaScript plug-ins are used entirely throughout the ResourceLoader, eliminate identical code among jqplotbar and jqplotpie classes, and make use of the same JavaScript for both jqplotseries and jqplotchart class.