Module:Chart/doc: Difference between revisions

Content deleted Content added
embed chart rendering code inline
remove redundancy
Line 122:
}}
</pre>
 
Notice the "units prefix" field: we do not need prefix for the first 2 groups, so we use colons with no content. we could write "::$" instead of " : : $".
 
Also note the special tooltip for the "Cars" number for 1965.
 
{{ #invoke:Chart | bar chart
Line 140 ⟶ 136:
}}
 
Notice the "units prefix" field: we do not need prefix for the first 2 groups, so we use colons with no content. As whitespace is ignored, we could write "::$" instead of " : : $".
<pre>
{{ #invoke:Chart | bar chart
| width = 800
| group 1 = 1500000 : 2500000 : 3500000
| group 2 = 200 : 5000 : 45000
| group 3 = 2000 : 5000 : 20000
| colors = red : blue : green
| group names = People : Cars : Average car cost
| x legends = 1920 : 1965 : 2002
| tooltip 2 = : There is no good data for number of cars in 1965. we use 5,000 as best estimate
| units prefix = : : $
| scale per group = 1
}}
</pre>
 
Also note the special tooltip for the "Cars" number for 1965.
Notice the "units prefix" field: we do not need prefix for the first 2 groups, so we use colons with no content. we could write "::$" instead of " : : $".
 
Also note the special tooltip for the "Cars" number for 1965.
 
Here is an example with large number of groups - mainly to test how it looks with large number of legends:
Line 226 ⟶ 208:
| stack = 1
}}
 
 
If there are many values, x legends can be diluted by using delimiters with nothing in between:
 
<pre>
{{ #invoke:Chart | bar chart