Help:Sparkline format
Sparkline format | |
---|---|
generates small inline charts (also known as sparklines) | |
Scenarios, examples, demos | |
Example: | Sparkline examples |
Collection | |
Further Information | |
Provided by: | Semantic Result Formats |
Added: | 1.8.0 |
Removed: | still supported |
Requirements: | none |
Format name: | sparkline |
Enabled? Indicates whether the result format is enabled by default upon installation of the respective extension. | Yes |
Authors: | James Hong Kong |
Categories: | charts |
Group: | , , |
Table of Contents | |
This printer format uses the jquery.sparkline plugin to generated small inline charts (also known as sparklines) directly into a text.
This format is mainly used to enhance inline text with information such as trends etc. which can be easily incorporated graphically without causing an overall distraction of the reading process. For more graphical enriched representations, one might consider other chart formats.
Parameters
⧼validator-describe-header-parameter⧽ | ⧼validator-describe-header-type⧽ | ⧼validator-describe-header-default⧽ | ⧼validator-describe-header-description⧽ |
---|---|---|---|
distribution | ⧼validator-type-boolean⧽ | no | Instead of displaying all values, count their occurrences, and show these. |
distributionsort | ⧼validator-type-string⧽ | none | Sort the value distribution by occurrence count. |
distributionlimit | ⧼validator-type-integer⧽ | no | Limit the value distribution to the count of only some values. |
aggregation | ⧼validator-type-string⧽ | subject | Specify to what the aggregation should relate to |
min | ⧼validator-type-integer⧽ | no | The minimum value to show on the Y-axis |
charttype | ⧼validator-type-string⧽ | bar | Available chart type |
class | ⧼validator-type-string⧽ | ⧼validator-describe-empty⧽ | Specify an additional cascading style sheet class |
For better inline alignment with the surrounded text, one can use a class parameter to assign a css class (see example below).
.demo-center { display: inline-block; }
Usage
Parameter [charttype] (pie, line, bar, discrete) determines the chart type.
{{#ask:[[Has value::+]] |?Has value |format=sparkline |link=all |headers=show |charttype=pie |class=demo-center }}
Examples
Property "Namespace" has a restricted application area and cannot be used as annotation property by a user.Property "Docinfo editor" (as page type) with input value "User:>MWJames" contains invalid characters or is incomplete and therefore can cause unexpected results during a query or annotation process.