साचा:Graph:PieChart/doc

विकिपीडिया, मुक्‍त ज्ञानकोशातून


Pie charts[संपादन]

You can add a pie chart with a call to this template. This template uses the Vega version 2 JSON specification. An older template {{Pie chart}} is based on CSS rendering. The template GraphChart allows adding of map, line, bar and area charts, as well as stacked line, stacked bar and stacked area charts, but no pie charts. The template GraphChart also uses Vega version 2 and uses Module:Graph with Scribunto/Lua programming. This Template:Graph:PieChart doesn't use Lua.

Parameters[संपादन]

  • radius specifies the radias of the pie chart in pixels, default is 100
  • legend specifies the title to be displayed above the legend, default is "Legend". To hide legend, set it to a "-" value without quotes.
  • values this is a list between square brackets of comma separated label value pairs between parentheses like [ {"x": "Peaches","y": 100}, {"x": "Plums","y": 32}]
  • rangeliteral this can be one of the Vega specified rangeliterals, default is "category10", but can also be a list like ["red", "green"]

Examples[संपादन]

Example usage:

{{Graph:PieChart|legend=Fruits|radius=125|values= [
      {"x": "Peaches","y": 100},
      {"x": "Plums","y": 32},
      {"x": "Blueberries","y": 80},
      {"x": "Strawberries","y": 46},
      {"x": "Bananes","y": 41}
    ] 
}}


TemplateData[संपादन]

यथादृश्यसंपादक व इतर साधनांसाठी वापरण्यात येणारे हे टेम्प्लेटडाटा दस्तावेजीकरण आहे.

Graph:PieChart साठी टेम्प्लेटडाटा

This template adds a pie chart to the page using Graph extension

साच्याचे प्राचल (पॅरामिटर्स)

ह्या टेंप्लेटचे प्रारुपण आपण आपल्या इच्छेप्रमाणे करु शकता.

प्राचलवर्णनप्रकारस्थिती
Radiusradius

Specify the radius of the pie in number of pixels

अविचल
100
उदाहरण
100
आकडासुचविलेले
Legend Titlelegend

The title that will appear above the legend, or '-' to hide it

अविचल
"Legend"
उदाहरण
"Fruits"
तंतूसुचविलेले
Inner Radiusinnerradius

To create a doughnut chart specify an inner radius

अविचल
0
उदाहरण
0
आकडाऐच्छिक
Valuesvalues data

Specify the label value pairs

उदाहरण
[ {"x": "Peaches","y": 100}, {"x": "Plums","y": 32}, {"x": "Blueberries","y": 80}, {"x": "Strawberries","y": 46}, {"x": "Bananes","y": 41} ]
अज्ञातहवे
The colors of the slicesrangeliteral colors

The colors of the slices, specified as Vega defined rangeliteral. This can also be a list like [ "red", "green" ]

अविचल
"category10"
उदाहरण
"category10"
तंतूऐच्छिक