Kontent qismiga oʻtish
Ilova test rejimida ishlamoqda: matnlar, jumlalar va soʻzlardagi xatoliklar tez orada tahrirchilar tomonidan tuzatiladi ✦
Ilova test rejimida ishlamoqda: matnlar, jumlalar va soʻzlardagi xatoliklar tez orada tahrirchilar tomonidan tuzatiladi ✦
Ilova test rejimida ishlamoqda: matnlar, jumlalar va soʻzlardagi xatoliklar tez orada tahrirchilar tomonidan tuzatiladi ✦
Ilova test rejimida ishlamoqda: matnlar, jumlalar va soʻzlardagi xatoliklar tez orada tahrirchilar tomonidan tuzatiladi ✦
Ilova test rejimida ishlamoqda: matnlar, jumlalar va soʻzlardagi xatoliklar tez orada tahrirchilar tomonidan tuzatiladi ✦
Ilova test rejimida ishlamoqda: matnlar, jumlalar va soʻzlardagi xatoliklar tez orada tahrirchilar tomonidan tuzatiladi ✦
Ilova test rejimida ishlamoqda: matnlar, jumlalar va soʻzlardagi xatoliklar tez orada tahrirchilar tomonidan tuzatiladi ✦
Ilova test rejimida ishlamoqda: matnlar, jumlalar va soʻzlardagi xatoliklar tez orada tahrirchilar tomonidan tuzatiladi ✦
Ilova test rejimida ishlamoqda: matnlar, jumlalar va soʻzlardagi xatoliklar tez orada tahrirchilar tomonidan tuzatiladi ✦
Ilova test rejimida ishlamoqda: matnlar, jumlalar va soʻzlardagi xatoliklar tez orada tahrirchilar tomonidan tuzatiladi ✦
Ilova test rejimida ishlamoqda: matnlar, jumlalar va soʻzlardagi xatoliklar tez orada tahrirchilar tomonidan tuzatiladi ✦
Ilova test rejimida ishlamoqda: matnlar, jumlalar va soʻzlardagi xatoliklar tez orada tahrirchilar tomonidan tuzatiladi ✦

Andoza:Graph:Chart/doc: Versiyalar orasidagi farq

ZiyoSfera, erkin ensiklopediya
Oʻzbekcha Vikipediyadan import qilindi.
Oʻzbekcha Vikipediyadan import qilindi.

$2, $3 dagi (joriy) koʻrinishi

  • Template:Graph

Lua xatosi in Modul:TNT at line 223: Missing Commons dataset I18n/Module:TNT.tab.

Agar sizda elektron jadval hujjatidan (masalan, LibreOffice Calc) yoki statistik dasturiy taʼminotdan R/R-Studio maʼlumotlar boʻlsa, ularni CSV fayliga eksport qilishingiz mumkin. CSV fayli v:en:AppLSAC bilan yuklanishi mumkin, u maʼlumotlar uchun diagrammadagi CSV-ni oʻzgartira oladi. Ustunning birinchi qatorida sarlavhalar boʻlishi kerak. CSV faylining ustunida float yoki butun son qiymatlari mavjud. CSV2WikiChart ZiyoSfera va maʼlumotlarni oʻz ichiga olgan Wikiversity oʻquv resurslari uchun qoʻllab-quvvatlash vositasi sifatida yaratilgan.


Asosiy misollar

[tahrir | manbasini tahrirlash]

Chiziqli diagramma:

{{Graph:Chart
 | width = 450
 | height = 150
 | type = line
 | x = 1,2,3,4,5,6,7,8,9
 | y = 10,12,6,14,2,10,7,9,12
}}

<graph>{"axes":[{"format":"d","grid":false,"properties":{"axis":{"stroke":{"value":"#54595d"},"strokeWidth":{"value":2}},"grid":{"stroke":{"value":"#54595d"}},"labels":{"fill":{"value":"#54595d"}},"ticks":{"stroke":{"value":"#54595d"}},"title":{"fill":{"value":"#54595d"}}},"scale":"x","type":"x"},{"format":"d","grid":false,"properties":{"axis":{"stroke":{"value":"#54595d"},"strokeWidth":{"value":2}},"grid":{"stroke":{"value":"#54595d"}},"labels":{"fill":{"value":"#54595d"}},"ticks":{"stroke":{"value":"#54595d"}},"title":{"fill":{"value":"#54595d"}}},"scale":"y","type":"y"}],"data":[{"format":{"parse":{"x":"integer","y":"integer"},"type":"json"},"name":"chart","values":[{"series":"y","x":1,"y":10},{"series":"y","x":2,"y":12},{"series":"y","x":3,"y":6},{"series":"y","x":4,"y":14},{"series":"y","x":5,"y":2},{"series":"y","x":6,"y":10},{"series":"y","x":7,"y":7},{"series":"y","x":8,"y":9},{"series":"y","x":9,"y":12}]}],"height":150,"legends":[],"marks":[{"from":{"data":"chart"},"properties":{"enter":{"stroke":{"field":"series","scale":"color"},"strokeWidth":{"value":2.5},"x":{"field":"x","scale":"x"},"y":{"field":"y","scale":"y"}},"hover":{"stroke":{"value":"red"}},"update":{"stroke":{"field":"series","scale":"color"}}},"type":"line"}],"scales":[{"domain":{"data":"chart","field":"x"},"name":"x","nice":true,"range":"width","type":"linear","zero":false},{"domain":{"data":"chart","field":"y"},"name":"y","nice":true,"range":"height","type":"linear","zero":false},{"domain":{"data":"chart","field":"series"},"name":"color","range":"category10","type":"ordinal"}],"version":2,"width":400}</graph>

Izoh: Y oʻqi eng kichik y qiymatidan boshlanadi, lekin uni yAxisMin parametri bilan bekor qilish mumkin.

Hudud diagrammasi:

{{Graph:Chart
 | width=400
 | height=100
 | type=area
 | x=1,2,3,4,5,6,7,8
 | y=10,12,6,14,2,10,7,9
}}

<graph>{"axes":[{"format":"d","grid":false,"properties":{"axis":{"stroke":{"value":"#54595d"},"strokeWidth":{"value":2}},"grid":{"stroke":{"value":"#54595d"}},"labels":{"fill":{"value":"#54595d"}},"ticks":{"stroke":{"value":"#54595d"}},"title":{"fill":{"value":"#54595d"}}},"scale":"x","type":"x"},{"format":"d","grid":false,"properties":{"axis":{"stroke":{"value":"#54595d"},"strokeWidth":{"value":2}},"grid":{"stroke":{"value":"#54595d"}},"labels":{"fill":{"value":"#54595d"}},"ticks":{"stroke":{"value":"#54595d"}},"title":{"fill":{"value":"#54595d"}}},"scale":"y","type":"y"}],"data":[{"format":{"parse":{"x":"integer","y":"integer"},"type":"json"},"name":"chart","values":[{"series":"y","x":1,"y":10},{"series":"y","x":2,"y":12},{"series":"y","x":3,"y":6},{"series":"y","x":4,"y":14},{"series":"y","x":5,"y":2},{"series":"y","x":6,"y":10},{"series":"y","x":7,"y":7},{"series":"y","x":8,"y":9}]}],"height":100,"legends":[],"marks":[{"from":{"data":"chart"},"properties":{"enter":{"fill":{"field":"series","scale":"color"},"x":{"field":"x","scale":"x"},"y":{"field":"y","scale":"y"},"y2":{"scale":"y","value":0}},"hover":{"fill":{"value":"red"}},"update":{"fill":{"field":"series","scale":"color"}}},"type":"area"}],"scales":[{"domain":{"data":"chart","field":"x"},"name":"x","nice":true,"range":"width","type":"linear","zero":false},{"domain":{"data":"chart","field":"y"},"name":"y","nice":true,"range":"height","type":"linear","zero":true},{"domain":{"data":"chart","field":"series"},"name":"color","range":"category10","type":"ordinal"}],"version":2,"width":400}</graph> Izoh: Y oʻqi noldan boshlanadi.

Bar chart:

{{Graph:Chart
 | width=400
 | height=100
 | xAxisTitle=The X axis
 | yAxisTitle=The Y axis
 | type=rect
 | x=1,2,3,4,5,6,7,8
 | y=10,12,6,14,2,10,7,9
}}

<graph>{"axes":[{"format":"d","grid":false,"properties":{"axis":{"stroke":{"value":"#54595d"},"strokeWidth":{"value":2}},"grid":{"stroke":{"value":"#54595d"}},"labels":{"fill":{"value":"#54595d"}},"ticks":{"stroke":{"value":"#54595d"}},"title":{"fill":{"value":"#54595d"}}},"scale":"x","title":"The X axis","type":"x"},{"format":"d","grid":false,"properties":{"axis":{"stroke":{"value":"#54595d"},"strokeWidth":{"value":2}},"grid":{"stroke":{"value":"#54595d"}},"labels":{"fill":{"value":"#54595d"}},"ticks":{"stroke":{"value":"#54595d"}},"title":{"fill":{"value":"#54595d"}}},"scale":"y","title":"The Y axis","type":"y"}],"data":[{"format":{"parse":{"x":"integer","y":"integer"},"type":"json"},"name":"chart","values":[{"series":"y","x":1,"y":10},{"series":"y","x":2,"y":12},{"series":"y","x":3,"y":6},{"series":"y","x":4,"y":14},{"series":"y","x":5,"y":2},{"series":"y","x":6,"y":10},{"series":"y","x":7,"y":7},{"series":"y","x":8,"y":9}]}],"height":100,"legends":[],"marks":[{"from":{"data":"chart"},"properties":{"enter":{"fill":{"field":"series","scale":"color"},"width":{"band":true,"offset":-1,"scale":"x"},"x":{"field":"x","scale":"x"},"y":{"field":"y","scale":"y"},"y2":{"scale":"y","value":0}},"hover":{"fill":{"value":"red"}},"update":{"fill":{"field":"series","scale":"color"}}},"type":"rect"}],"scales":[{"domain":{"data":"chart","field":"x"},"name":"x","nice":true,"padding":0.2,"range":"width","type":"ordinal","zero":false},{"domain":{"data":"chart","field":"y"},"name":"y","nice":true,"range":"height","type":"linear","zero":true},{"domain":{"data":"chart","field":"series"},"name":"color","range":"category10","type":"ordinal"}],"version":2,"width":400}</graph>

Bir nechta maʼlumotlar seriyasi

[tahrir | manbasini tahrirlash]

Chiziqli diagramma ranglardan foydalangan holda bir nechta maʼlumotlar seriyasi bilan:

{{Graph:Chart
 | width=400
 | height=150
 | xGrid=
 | yGrid=
 | xAxisTitle=X
 | yAxisTitle=Y
 | legend=Legend
 | type=line
 | x=1,2,3,4,5,6,7,8
 | y1=10,12,6,14,2,10,7,9
 | y1Title=Y1 Series
 | y2=2,4,6,8,13,11,9,2
 | y2Title=Y2 Series
 | colors=#0000aa,#ff8000
}}

<graph>{"axes":[{"format":"d","grid":true,"properties":{"axis":{"stroke":{"value":"#54595d"},"strokeWidth":{"value":2}},"grid":{"stroke":{"value":"#54595d"}},"labels":{"fill":{"value":"#54595d"}},"ticks":{"stroke":{"value":"#54595d"}},"title":{"fill":{"value":"#54595d"}}},"scale":"x","title":"X","type":"x"},{"format":"d","grid":true,"properties":{"axis":{"stroke":{"value":"#54595d"},"strokeWidth":{"value":2}},"grid":{"stroke":{"value":"#54595d"}},"labels":{"fill":{"value":"#54595d"}},"ticks":{"stroke":{"value":"#54595d"}},"title":{"fill":{"value":"#54595d"}}},"scale":"y","title":"Y","type":"y"}],"data":[{"format":{"parse":{"x":"integer","y":"integer"},"type":"json"},"name":"chart","values":[{"series":"Y1 Series","x":1,"y":10},{"series":"Y1 Series","x":2,"y":12},{"series":"Y1 Series","x":3,"y":6},{"series":"Y1 Series","x":4,"y":14},{"series":"Y1 Series","x":5,"y":2},{"series":"Y1 Series","x":6,"y":10},{"series":"Y1 Series","x":7,"y":7},{"series":"Y1 Series","x":8,"y":9},{"series":"Y2 Series","x":1,"y":2},{"series":"Y2 Series","x":2,"y":4},{"series":"Y2 Series","x":3,"y":6},{"series":"Y2 Series","x":4,"y":8},{"series":"Y2 Series","x":5,"y":13},{"series":"Y2 Series","x":6,"y":11},{"series":"Y2 Series","x":7,"y":9},{"series":"Y2 Series","x":8,"y":2}]}],"height":150,"legends":[{"fill":"color","properties":{"labels":{"fill":{"value":"#54595d"}},"title":{"fill":{"value":"#54595d"}}},"stroke":"color","title":"Legend"}],"marks":[{"from":{"data":"chart","transform":[{"groupby":["series"],"type":"facet"}]},"marks":[{"properties":{"enter":{"stroke":{"field":"series","scale":"color"},"strokeWidth":{"value":2.5},"x":{"field":"x","scale":"x"},"y":{"field":"y","scale":"y"}},"hover":{"stroke":{"value":"red"}},"update":{"stroke":{"field":"series","scale":"color"}}},"type":"line"}],"type":"group"}],"scales":[{"domain":{"data":"chart","field":"x"},"name":"x","nice":true,"range":"width","type":"linear","zero":false},{"domain":{"data":"chart","field":"y"},"name":"y","nice":true,"range":"height","type":"linear","zero":false},{"domain":{"data":"chart","field":"series"},"name":"color","range":["#0000aa","#ff8000"],"type":"ordinal"}],"version":2,"width":400}</graph>

Aralashtirilgan oʻxshashlikni koʻrsatadigan bir nechta maʼlumotlar seriyali hudud diagrammasi:

{{Graph:Chart
 | width=400
 | height=100
 | xAxisTitle=X
 | yAxisTitle=Y
 | legend=Legend
 | type=area
 | x=1,2,3,4,5,6,7,8
 | y1=10,12,6,14,2,10,7,9
 | y2=2,4,6,8,13,11,9,2
 | colors=#800000aa,#80ff8000
}}

<graph>{"axes":[{"format":"d","grid":false,"properties":{"axis":{"stroke":{"value":"#54595d"},"strokeWidth":{"value":2}},"grid":{"stroke":{"value":"#54595d"}},"labels":{"fill":{"value":"#54595d"}},"ticks":{"stroke":{"value":"#54595d"}},"title":{"fill":{"value":"#54595d"}}},"scale":"x","title":"X","type":"x"},{"format":"d","grid":false,"properties":{"axis":{"stroke":{"value":"#54595d"},"strokeWidth":{"value":2}},"grid":{"stroke":{"value":"#54595d"}},"labels":{"fill":{"value":"#54595d"}},"ticks":{"stroke":{"value":"#54595d"}},"title":{"fill":{"value":"#54595d"}}},"scale":"y","title":"Y","type":"y"}],"data":[{"format":{"parse":{"x":"integer","y":"integer"},"type":"json"},"name":"chart","values":[{"series":"y1","x":1,"y":10},{"series":"y1","x":2,"y":12},{"series":"y1","x":3,"y":6},{"series":"y1","x":4,"y":14},{"series":"y1","x":5,"y":2},{"series":"y1","x":6,"y":10},{"series":"y1","x":7,"y":7},{"series":"y1","x":8,"y":9},{"series":"y2","x":1,"y":2},{"series":"y2","x":2,"y":4},{"series":"y2","x":3,"y":6},{"series":"y2","x":4,"y":8},{"series":"y2","x":5,"y":13},{"series":"y2","x":6,"y":11},{"series":"y2","x":7,"y":9},{"series":"y2","x":8,"y":2}]}],"height":100,"legends":[{"fill":"color","properties":{"labels":{"fill":{"value":"#54595d"}},"title":{"fill":{"value":"#54595d"}}},"stroke":"color","title":"Legend"}],"marks":[{"from":{"data":"chart","transform":[{"groupby":["series"],"type":"facet"}]},"marks":[{"properties":{"enter":{"fill":{"field":"series","scale":"color"},"x":{"field":"x","scale":"x"},"y":{"field":"y","scale":"y"},"y2":{"scale":"y","value":0}},"hover":{"fill":{"value":"red"}},"update":{"fill":{"field":"series","scale":"color"},"fillOpacity":{"field":"series","scale":"transparency"}}},"type":"area"}],"type":"group"}],"scales":[{"domain":{"data":"chart","field":"x"},"name":"x","nice":true,"range":"width","type":"linear","zero":false},{"domain":{"data":"chart","field":"y"},"name":"y","nice":true,"range":"height","type":"linear","zero":true},{"domain":{"data":"chart","field":"series"},"name":"color","range":["#0000aa","#ff8000"],"type":"ordinal"},{"name":"transparency","range":["0.50196078431373","0.50196078431373"],"type":"ordinal"}],"version":2,"width":400}</graph>

Bir nechta maʼlumotlar seriyali shtrixli diagramma:

{{Graph:Chart
 | width=400
 | height=100
 | xAxisTitle=X
 | yAxisTitle=Y
 | legend=Legend
 | type=rect
 | x=1,2,3,4,5,6,7,8
 | y1=10,12,6,14,2,10,7,9
 | y2=2,4,6,8,13,11,9,2
 |colors=#800000aa,#80ff8000
}}

<graph>{"axes":[{"format":"d","grid":false,"properties":{"axis":{"stroke":{"value":"#54595d"},"strokeWidth":{"value":2}},"grid":{"stroke":{"value":"#54595d"}},"labels":{"fill":{"value":"#54595d"}},"ticks":{"stroke":{"value":"#54595d"}},"title":{"fill":{"value":"#54595d"}}},"scale":"x","title":"X","type":"x"},{"format":"d","grid":false,"properties":{"axis":{"stroke":{"value":"#54595d"},"strokeWidth":{"value":2}},"grid":{"stroke":{"value":"#54595d"}},"labels":{"fill":{"value":"#54595d"}},"ticks":{"stroke":{"value":"#54595d"}},"title":{"fill":{"value":"#54595d"}}},"scale":"y","title":"Y","type":"y"}],"data":[{"format":{"parse":{"x":"integer","y":"integer"},"type":"json"},"name":"chart","values":[{"series":"y1","x":1,"y":10},{"series":"y1","x":2,"y":12},{"series":"y1","x":3,"y":6},{"series":"y1","x":4,"y":14},{"series":"y1","x":5,"y":2},{"series":"y1","x":6,"y":10},{"series":"y1","x":7,"y":7},{"series":"y1","x":8,"y":9},{"series":"y2","x":1,"y":2},{"series":"y2","x":2,"y":4},{"series":"y2","x":3,"y":6},{"series":"y2","x":4,"y":8},{"series":"y2","x":5,"y":13},{"series":"y2","x":6,"y":11},{"series":"y2","x":7,"y":9},{"series":"y2","x":8,"y":2}]}],"height":100,"legends":[{"fill":"color","properties":{"labels":{"fill":{"value":"#54595d"}},"title":{"fill":{"value":"#54595d"}}},"stroke":"color","title":"Legend"}],"marks":[{"from":{"data":"chart","transform":[{"groupby":"x","type":"facet"}]},"marks":[{"properties":{"enter":{"fill":{"field":"series","scale":"color"},"width":{"band":true,"offset":-1,"scale":"series"},"x":{"field":"series","scale":"series"},"y":{"field":"y","scale":"y"},"y2":{"scale":"y","value":0}},"hover":{"fill":{"value":"red"}},"update":{"fill":{"field":"series","scale":"color"},"fillOpacity":{"field":"series","scale":"transparency"}}},"type":"rect"}],"properties":{"enter":{"width":{"band":true,"scale":"x"},"x":{"field":"key","scale":"x"}}},"scales":[{"domain":{"field":"series"},"name":"series","range":"width","type":"ordinal"}],"type":"group"}],"scales":[{"domain":{"data":"chart","field":"x"},"name":"x","nice":true,"padding":0.2,"range":"width","type":"ordinal","zero":false},{"domain":{"data":"chart","field":"y"},"name":"y","nice":true,"range":"height","type":"linear","zero":true},{"domain":{"data":"chart","field":"series"},"name":"color","range":["#0000aa","#ff8000"],"type":"ordinal"},{"name":"transparency","range":["0.50196078431373","0.50196078431373"],"type":"ordinal"}],"version":2,"width":400}</graph>

Aniq maʼlumotlar qiymatlari bilan hudud diagrammasi:

{{Graph:Chart
 | width=400
 | height=150
 | xAxisTitle=X
 | yAxisTitle=Y
 | legend=Legend
 | type=stackedarea
 | x=1,2,3,4,5,6,7,8
 | y1=10,12,6,14,2,10,7,9
 | y2=2,4,6,8,13,11,9,2
 | interpolate=monotone
 | colors=seagreen, orchid
}}

<graph>{"axes":[{"format":"d","grid":false,"properties":{"axis":{"stroke":{"value":"#54595d"},"strokeWidth":{"value":2}},"grid":{"stroke":{"value":"#54595d"}},"labels":{"fill":{"value":"#54595d"}},"ticks":{"stroke":{"value":"#54595d"}},"title":{"fill":{"value":"#54595d"}}},"scale":"x","title":"X","type":"x"},{"format":"d","grid":false,"properties":{"axis":{"stroke":{"value":"#54595d"},"strokeWidth":{"value":2}},"grid":{"stroke":{"value":"#54595d"}},"labels":{"fill":{"value":"#54595d"}},"ticks":{"stroke":{"value":"#54595d"}},"title":{"fill":{"value":"#54595d"}}},"scale":"y","title":"Y","type":"y"}],"data":[{"format":{"parse":{"x":"integer","y":"integer"},"type":"json"},"name":"chart","values":[{"series":"y1","x":1,"y":10},{"series":"y1","x":2,"y":12},{"series":"y1","x":3,"y":6},{"series":"y1","x":4,"y":14},{"series":"y1","x":5,"y":2},{"series":"y1","x":6,"y":10},{"series":"y1","x":7,"y":7},{"series":"y1","x":8,"y":9},{"series":"y2","x":1,"y":2},{"series":"y2","x":2,"y":4},{"series":"y2","x":3,"y":6},{"series":"y2","x":4,"y":8},{"series":"y2","x":5,"y":13},{"series":"y2","x":6,"y":11},{"series":"y2","x":7,"y":9},{"series":"y2","x":8,"y":2}]},{"name":"stats","source":"chart","transform":[{"groupby":["x"],"summarize":{"y":"sum"},"type":"aggregate"}]}],"height":150,"legends":[{"fill":"color","properties":{"labels":{"fill":{"value":"#54595d"}},"title":{"fill":{"value":"#54595d"}}},"stroke":"color","title":"Legend"}],"marks":[{"from":{"data":"chart","transform":[{"field":"y","groupby":["x"],"sortby":["-_id"],"type":"stack"},{"groupby":["series"],"type":"facet"}]},"marks":[{"properties":{"enter":{"fill":{"field":"series","scale":"color"},"interpolate":{"value":"monotone"},"x":{"field":"x","scale":"x"},"y":{"field":"layout_start","scale":"y"},"y2":{"field":"layout_end","scale":"y"}},"hover":{"fill":{"value":"red"}},"update":{"fill":{"field":"series","scale":"color"}}},"type":"area"}],"type":"group"}],"scales":[{"domain":{"data":"chart","field":"x"},"name":"x","nice":true,"range":"width","type":"linear","zero":false},{"domain":{"data":"stats","field":"sum_y"},"name":"y","nice":true,"range":"height","type":"linear","zero":true},{"domain":{"data":"chart","field":"series"},"name":"color","range":["seagreen","orchid"],"type":"ordinal"}],"version":2,"width":400}</graph>

Yigʻilgan maʼlumotlar seriyali shtrixli diagramma:

{{Graph:Chart
 | width=400 | height=150
 | xAxisTitle=X
 | yAxisTitle=Y
 | legend=Legend
 | type=stackedrect
 | x=1,2,3,4,5,6,7,8
 | y1=10,12,6,14,2,10,7,9
 | y2=2,4,6,8,13,11,9,2
 | y1Title=Data A
 | y2Title=Data B
 | colors=seagreen, orchid
}}

<graph>{"axes":[{"format":"d","grid":false,"properties":{"axis":{"stroke":{"value":"#54595d"},"strokeWidth":{"value":2}},"grid":{"stroke":{"value":"#54595d"}},"labels":{"fill":{"value":"#54595d"}},"ticks":{"stroke":{"value":"#54595d"}},"title":{"fill":{"value":"#54595d"}}},"scale":"x","title":"X","type":"x"},{"format":"d","grid":false,"properties":{"axis":{"stroke":{"value":"#54595d"},"strokeWidth":{"value":2}},"grid":{"stroke":{"value":"#54595d"}},"labels":{"fill":{"value":"#54595d"}},"ticks":{"stroke":{"value":"#54595d"}},"title":{"fill":{"value":"#54595d"}}},"scale":"y","title":"Y","type":"y"}],"data":[{"format":{"parse":{"x":"integer","y":"integer"},"type":"json"},"name":"chart","values":[{"series":"Data A","x":1,"y":10},{"series":"Data A","x":2,"y":12},{"series":"Data A","x":3,"y":6},{"series":"Data A","x":4,"y":14},{"series":"Data A","x":5,"y":2},{"series":"Data A","x":6,"y":10},{"series":"Data A","x":7,"y":7},{"series":"Data A","x":8,"y":9},{"series":"Data B","x":1,"y":2},{"series":"Data B","x":2,"y":4},{"series":"Data B","x":3,"y":6},{"series":"Data B","x":4,"y":8},{"series":"Data B","x":5,"y":13},{"series":"Data B","x":6,"y":11},{"series":"Data B","x":7,"y":9},{"series":"Data B","x":8,"y":2}]},{"name":"stats","source":"chart","transform":[{"groupby":["x"],"summarize":{"y":"sum"},"type":"aggregate"}]}],"height":150,"legends":[{"fill":"color","properties":{"labels":{"fill":{"value":"#54595d"}},"title":{"fill":{"value":"#54595d"}}},"stroke":"color","title":"Legend"}],"marks":[{"from":{"data":"chart","transform":[{"field":"y","groupby":["x"],"sortby":["-_id"],"type":"stack"},{"groupby":["series"],"type":"facet"}]},"marks":[{"properties":{"enter":{"fill":{"field":"series","scale":"color"},"width":{"band":true,"offset":-1,"scale":"x"},"x":{"field":"x","scale":"x"},"y":{"field":"layout_start","scale":"y"},"y2":{"field":"layout_end","scale":"y"}},"hover":{"fill":{"value":"red"}},"update":{"fill":{"field":"series","scale":"color"}}},"type":"rect"}],"type":"group"}],"scales":[{"domain":{"data":"chart","field":"x"},"name":"x","nice":true,"range":"width","type":"ordinal","zero":false},{"domain":{"data":"stats","field":"sum_y"},"name":"y","nice":true,"range":"height","type":"linear","zero":true},{"domain":{"data":"chart","field":"series"},"name":"color","range":["seagreen","orchid"],"type":"ordinal"}],"version":2,"width":400}</graph>

Doiraviy diagramma

[tahrir | manbasini tahrirlash]
{{Graph:Chart
 | width=100
 | height=100
 | type=pie
 | legend=Letter
 | x=A,B,C,D,E,F,G,H,I
 | y1=100,200,150,300,100,100,150,50,200
}}

<graph>{"axes":[],"data":[{"format":{"parse":{"x":"string","y":"integer"},"type":"json"},"name":"chart","values":[{"x":"A","y":100},{"x":"B","y":200},{"x":"C","y":150},{"x":"D","y":300},{"x":"E","y":100},{"x":"F","y":100},{"x":"G","y":150},{"x":"H","y":50},{"x":"I","y":200}]}],"height":100,"legends":[{"fill":"color","properties":{"labels":{"fill":{"value":"#54595d"}},"legend":{"y":{"value":-100}},"title":{"fill":{"value":"#54595d"}}},"stroke":"color","title":"Letter"}],"marks":[{"from":{"data":"chart","transform":[{"field":"y","type":"pie"}]},"properties":{"enter":{"endAngle":{"field":"layout_end"},"fill":{"field":"x","scale":"color"},"innerRadius":{"value":0},"outerRadius":{"value":100},"startAngle":{"field":"layout_start"},"stroke":{"value":"white"},"strokeWidth":{"value":1}},"hover":{"fill":{"value":"red"}},"update":{"fill":{"field":"x","scale":"color"}}},"type":"arc"}],"scales":[{"domain":{"data":"chart","field":"x"},"name":"color","range":"category10","type":"ordinal"}],"version":2,"width":100}</graph>


{{Graph:Chart
 | width=100
 | height=100
 | type=pie
 | legend=Letter
 | x=A,B,C,D,E,F,G,H,I
 | y1=100,200,150,300,100,100,150,50,200
 | showValues=
}}

<graph>{"axes":[],"data":[{"format":{"parse":{"x":"string","y":"integer"},"type":"json"},"name":"chart","values":[{"x":"A","y":100},{"x":"B","y":200},{"x":"C","y":150},{"x":"D","y":300},{"x":"E","y":100},{"x":"F","y":100},{"x":"G","y":150},{"x":"H","y":50},{"x":"I","y":200}]}],"height":100,"legends":[{"fill":"color","properties":{"labels":{"fill":{"value":"#54595d"}},"legend":{"y":{"value":-100}},"title":{"fill":{"value":"#54595d"}}},"stroke":"color","title":"Letter"}],"marks":[{"from":{"data":"chart","transform":[{"field":"y","type":"pie"}]},"properties":{"enter":{"endAngle":{"field":"layout_end"},"fill":{"field":"x","scale":"color"},"innerRadius":{"value":0},"outerRadius":{"value":100},"startAngle":{"field":"layout_start"},"stroke":{"value":"white"},"strokeWidth":{"value":1}},"hover":{"fill":{"value":"red"}},"update":{"fill":{"field":"x","scale":"color"}}},"type":"arc"},{"from":{"data":"chart","transform":[{"field":"y","type":"pie"}]},"properties":{"enter":{"align":{"value":"center"},"angle":{"field":"layout_mid","mult":57.29577951308232},"baseline":{"value":"top"},"fill":{"value":"white"},"fontSize":{"value":10},"radius":{"offset":-4,"value":100},"text":{"field":"y"},"theta":{"field":"layout_mid"},"x":{"group":"width","mult":0.5},"y":{"group":"height","mult":0.5}}},"type":"text"}],"scales":[{"domain":{"data":"chart","field":"x"},"name":"color","range":"category10","type":"ordinal"}],"version":2,"width":100}</graph>


{{Graph:Chart
 | width=100
 | height=100
 | type=pie
 | legend=Letter
 | x=A,B,C,D,E,F,G,H,I
 | y1=100,200,150,300,100,100,150,50,200
 | y2=7,8,9,8,8,9,10,9,5
 | showValues=
}}

<graph>{"axes":[],"data":[{"format":{"parse":{"r":"integer","x":"string","y":"integer"},"type":"json"},"name":"chart","values":[{"r":7,"x":"A","y":100},{"r":8,"x":"B","y":200},{"r":9,"x":"C","y":150},{"r":8,"x":"D","y":300},{"r":8,"x":"E","y":100},{"r":9,"x":"F","y":100},{"r":10,"x":"G","y":150},{"r":9,"x":"H","y":50},{"r":5,"x":"I","y":200}]}],"height":100,"legends":[{"fill":"color","properties":{"labels":{"fill":{"value":"#54595d"}},"legend":{"y":{"value":-100}},"title":{"fill":{"value":"#54595d"}}},"stroke":"color","title":"Letter"}],"marks":[{"from":{"data":"chart","transform":[{"field":"y","type":"pie"}]},"properties":{"enter":{"endAngle":{"field":"layout_end"},"fill":{"field":"x","scale":"color"},"innerRadius":{"value":0},"outerRadius":{"field":"r","scale":"r"},"startAngle":{"field":"layout_start"},"stroke":{"value":"white"},"strokeWidth":{"value":1}},"hover":{"fill":{"value":"red"}},"update":{"fill":{"field":"x","scale":"color"}}},"type":"arc"},{"from":{"data":"chart","transform":[{"field":"y","type":"pie"}]},"properties":{"enter":{"align":{"value":"center"},"angle":{"field":"layout_mid","mult":57.29577951308232},"baseline":{"value":"top"},"fill":{"value":"white"},"fontSize":{"value":10},"radius":{"field":"r","offset":-4,"scale":"r"},"text":{"field":"y"},"theta":{"field":"layout_mid"},"x":{"group":"width","mult":0.5},"y":{"group":"height","mult":0.5}}},"type":"text"}],"scales":[{"domain":{"data":"chart","field":"x"},"name":"color","range":"category10","type":"ordinal"},{"domain":{"data":"chart","field":"r"},"name":"r","range":[0,100],"type":"linear"}],"version":2,"width":100}</graph>

{{Graph:Chart
 | width=100
 | height=100
 | type=pie
 | innerRadius=40
 | legend=Letter
 | x=A,B,C,D,E,F,G,H,I
 | y1=100,200,150,300,100,100,150,50,200
}}

<graph>{"axes":[],"data":[{"format":{"parse":{"x":"string","y":"integer"},"type":"json"},"name":"chart","values":[{"x":"A","y":100},{"x":"B","y":200},{"x":"C","y":150},{"x":"D","y":300},{"x":"E","y":100},{"x":"F","y":100},{"x":"G","y":150},{"x":"H","y":50},{"x":"I","y":200}]}],"height":100,"legends":[{"fill":"color","properties":{"labels":{"fill":{"value":"#54595d"}},"legend":{"y":{"value":-100}},"title":{"fill":{"value":"#54595d"}}},"stroke":"color","title":"Letter"}],"marks":[{"from":{"data":"chart","transform":[{"field":"y","type":"pie"}]},"properties":{"enter":{"endAngle":{"field":"layout_end"},"fill":{"field":"x","scale":"color"},"innerRadius":{"value":40},"outerRadius":{"value":100},"startAngle":{"field":"layout_start"},"stroke":{"value":"white"},"strokeWidth":{"value":1}},"hover":{"fill":{"value":"red"}},"update":{"fill":{"field":"x","scale":"color"}}},"type":"arc"}],"scales":[{"domain":{"data":"chart","field":"x"},"name":"color","range":"category10","type":"ordinal"}],"version":2,"width":100}</graph>

Qismli diagramma

[tahrir | manbasini tahrirlash]

linewidth=0 bilan chiziqli chizmadan foydalanib, qism diagrammasi yaratish mumkin:

{{Graph:Chart
|width=500
|height=200
|type=line
|x=15.7,10.8,68.5,33.4,23.8,42.2,27.1,38.2,13.5,74.3
|y1=1517,970,4075,3819,2106,2919,2428,2164,1393,7603
|showSymbols=1
|linewidth=0
|yGrid= |xGrid= 
}}

<graph>{"axes":[{"grid":true,"properties":{"axis":{"stroke":{"value":"#54595d"},"strokeWidth":{"value":2}},"grid":{"stroke":{"value":"#54595d"}},"labels":{"fill":{"value":"#54595d"}},"ticks":{"stroke":{"value":"#54595d"}},"title":{"fill":{"value":"#54595d"}}},"scale":"x","type":"x"},{"format":"d","grid":true,"properties":{"axis":{"stroke":{"value":"#54595d"},"strokeWidth":{"value":2}},"grid":{"stroke":{"value":"#54595d"}},"labels":{"fill":{"value":"#54595d"}},"ticks":{"stroke":{"value":"#54595d"}},"title":{"fill":{"value":"#54595d"}}},"scale":"y","type":"y"}],"data":[{"format":{"parse":{"x":"number","y":"integer"},"type":"json"},"name":"chart","values":[{"series":"y1","x":15.7,"y":1517},{"series":"y1","x":10.8,"y":970},{"series":"y1","x":68.5,"y":4075},{"series":"y1","x":33.4,"y":3819},{"series":"y1","x":23.8,"y":2106},{"series":"y1","x":42.2,"y":2919},{"series":"y1","x":27.1,"y":2428},{"series":"y1","x":38.2,"y":2164},{"series":"y1","x":13.5,"y":1393},{"series":"y1","x":74.3,"y":7603}]}],"height":200,"legends":[],"marks":[{"from":{"data":"chart"},"properties":{"enter":{"stroke":{"field":"series","scale":"color"},"strokeWidth":{"value":0},"x":{"field":"x","scale":"x"},"y":{"field":"y","scale":"y"}},"hover":{"stroke":{"value":"red"}},"update":{"stroke":{"field":"series","scale":"color"}}},"type":"line"},{"from":{"data":"chart"},"properties":{"enter":{"fill":{"field":"series","scale":"color"},"shape":{"value":"circle"},"size":{"field":"series","scale":"symSize"},"stroke":{"field":"series","scale":"color"},"strokeWidth":{"value":0},"x":{"field":"x","scale":"x"},"y":{"field":"y","scale":"y"}}},"type":"symbol"}],"scales":[{"domain":{"data":"chart","field":"x"},"name":"x","nice":true,"range":"width","type":"linear","zero":false},{"domain":{"data":"chart","field":"y"},"name":"y","nice":true,"range":"height","type":"linear","zero":false},{"domain":{"data":"chart","field":"series"},"name":"color","range":"category10","type":"ordinal"},{"domain":{"data":"chart","field":"series"},"name":"symSize","range":[8.5],"type":"ordinal"}],"version":2,"width":500}</graph>

Foizlardan foydalanish

[tahrir | manbasini tahrirlash]
  • xAxisFormat yoki yAxisFormat % ga oʻrnatilganda, mos keladigan oʻqning shkalasiga foiz belgisi qoʻshiladi.
  • 1 qiymati 100 % ga teng. 0 dan 100 gacha boʻlgan foizlar oldiga kasr nuqtasi qoʻshilishi kerak, masalan, 25 % uchun .25.
  • Shu jumladan <kod>| yAxisMin=0 | yAxisMax=1 y oʻqi shkalasini 0 % dan 100 % gacha ishlashga majbur qiladi.
{{Graph:Chart
| width = 450
| height = 350
| x = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23
| yAxisMin = 0
| yAxisMax = 1
| yAxisFormat = %
| showSymbols = 
| y1 = , , , .43, , , , .39, .43, .38, .38, .40, .48, .54 , .42, .47, .45, .48, .44, .41, .41, .45, .46
| y2 = .40, .377, .38, , .39, .38, .419, .55, .60, .63
| y3 = .27, .311, .31, , .26, .28, .285
| y4 = {{repeat|7|, }} .40, .44, .42, .47, .44, .43, .42
}}

<graph>{"axes":[{"format":"d","grid":false,"properties":{"axis":{"stroke":{"value":"#54595d"},"strokeWidth":{"value":2}},"grid":{"stroke":{"value":"#54595d"}},"labels":{"fill":{"value":"#54595d"}},"ticks":{"stroke":{"value":"#54595d"}},"title":{"fill":{"value":"#54595d"}}},"scale":"x","type":"x"},{"format":"%","grid":false,"properties":{"axis":{"stroke":{"value":"#54595d"},"strokeWidth":{"value":2}},"grid":{"stroke":{"value":"#54595d"}},"labels":{"fill":{"value":"#54595d"}},"ticks":{"stroke":{"value":"#54595d"}},"title":{"fill":{"value":"#54595d"}}},"scale":"y","type":"y"}],"data":[{"format":{"parse":{"x":"integer","y":"string"},"type":"json"},"name":"chart","values":[{"series":"y1","x":1,"y":""},{"series":"y1","x":2,"y":""},{"series":"y1","x":3,"y":""},{"series":"y1","x":4,"y":".43"},{"series":"y1","x":5,"y":""},{"series":"y1","x":6,"y":""},{"series":"y1","x":7,"y":""},{"series":"y1","x":8,"y":".39"},{"series":"y1","x":9,"y":".43"},{"series":"y1","x":10,"y":".38"},{"series":"y1","x":11,"y":".38"},{"series":"y1","x":12,"y":".40"},{"series":"y1","x":13,"y":".48"},{"series":"y1","x":14,"y":".54"},{"series":"y1","x":15,"y":".42"},{"series":"y1","x":16,"y":".47"},{"series":"y1","x":17,"y":".45"},{"series":"y1","x":18,"y":".48"},{"series":"y1","x":19,"y":".44"},{"series":"y1","x":20,"y":".41"},{"series":"y1","x":21,"y":".41"},{"series":"y1","x":22,"y":".45"},{"series":"y1","x":23,"y":".46"},{"series":"y2","x":1,"y":".40"},{"series":"y2","x":2,"y":".377"},{"series":"y2","x":3,"y":".38"},{"series":"y2","x":4,"y":""},{"series":"y2","x":5,"y":".39"},{"series":"y2","x":6,"y":".38"},{"series":"y2","x":7,"y":".419"},{"series":"y2","x":8,"y":".55"},{"series":"y2","x":9,"y":".60"},{"series":"y2","x":10,"y":".63"},{"series":"y3","x":1,"y":".27"},{"series":"y3","x":2,"y":".311"},{"series":"y3","x":3,"y":".31"},{"series":"y3","x":4,"y":""},{"series":"y3","x":5,"y":".26"},{"series":"y3","x":6,"y":".28"},{"series":"y3","x":7,"y":".285"},{"series":"y4","x":1,"y":"Andoza:Repeat .40"},{"series":"y4","x":2,"y":".44"},{"series":"y4","x":3,"y":".42"},{"series":"y4","x":4,"y":".47"},{"series":"y4","x":5,"y":".44"},{"series":"y4","x":6,"y":".43"},{"series":"y4","x":7,"y":".42"}]}],"height":350,"legends":[],"marks":[{"from":{"data":"chart","transform":[{"groupby":["series"],"type":"facet"}]},"marks":[{"properties":{"enter":{"stroke":{"field":"series","scale":"color"},"strokeWidth":{"value":2.5},"x":{"field":"x","scale":"x"},"y":{"field":"y","scale":"y"}},"hover":{"stroke":{"value":"red"}},"update":{"stroke":{"field":"series","scale":"color"}}},"type":"line"},{"properties":{"enter":{"fill":{"field":"series","scale":"color"},"shape":{"value":"circle"},"size":{"value":50},"stroke":{"field":"series","scale":"color"},"strokeWidth":{"value":0},"x":{"field":"x","scale":"x"},"y":{"field":"y","scale":"y"}}},"type":"symbol"}],"type":"group"}],"scales":[{"domain":{"data":"chart","field":"x"},"name":"x","nice":true,"range":"width","type":"linear","zero":false},{"clamp":true,"domain":{"data":"chart","field":"y"},"domainMax":"1","domainMin":"0","name":"y","nice":true,"range":"height","type":"ordinal","zero":false},{"domain":{"data":"chart","field":"series"},"name":"color","range":"category10","type":"ordinal"}],"version":2,"width":450}</graph>

100 % dan katta qiymatlarni va salbiy qiymatlarni koʻrsatadigan grafik:

{{Graph:Chart
| width = 450
| height = 350
| x = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23
| yAxisFormat = %
| showSymbols = 
| y1 = 2, .43, 1.20, .39, .43, .0, -.38, -.20, .18, .54 , 0
}}

<graph>{"axes":[{"format":"d","grid":false,"properties":{"axis":{"stroke":{"value":"#54595d"},"strokeWidth":{"value":2}},"grid":{"stroke":{"value":"#54595d"}},"labels":{"fill":{"value":"#54595d"}},"ticks":{"stroke":{"value":"#54595d"}},"title":{"fill":{"value":"#54595d"}}},"scale":"x","type":"x"},{"format":"%","grid":false,"properties":{"axis":{"stroke":{"value":"#54595d"},"strokeWidth":{"value":2}},"grid":{"stroke":{"value":"#54595d"}},"labels":{"fill":{"value":"#54595d"}},"ticks":{"stroke":{"value":"#54595d"}},"title":{"fill":{"value":"#54595d"}}},"scale":"y","type":"y"}],"data":[{"format":{"parse":{"x":"integer","y":"number"},"type":"json"},"name":"chart","values":[{"series":"y1","x":1,"y":2},{"series":"y1","x":2,"y":0.43},{"series":"y1","x":3,"y":1.2},{"series":"y1","x":4,"y":0.39},{"series":"y1","x":5,"y":0.43},{"series":"y1","x":6,"y":0},{"series":"y1","x":7,"y":-0.38},{"series":"y1","x":8,"y":-0.2},{"series":"y1","x":9,"y":0.18},{"series":"y1","x":10,"y":0.54},{"series":"y1","x":11,"y":0}]}],"height":350,"legends":[],"marks":[{"from":{"data":"chart"},"properties":{"enter":{"stroke":{"field":"series","scale":"color"},"strokeWidth":{"value":2.5},"x":{"field":"x","scale":"x"},"y":{"field":"y","scale":"y"}},"hover":{"stroke":{"value":"red"}},"update":{"stroke":{"field":"series","scale":"color"}}},"type":"line"},{"from":{"data":"chart"},"properties":{"enter":{"fill":{"field":"series","scale":"color"},"shape":{"value":"circle"},"size":{"value":50},"stroke":{"field":"series","scale":"color"},"strokeWidth":{"value":0},"x":{"field":"x","scale":"x"},"y":{"field":"y","scale":"y"}}},"type":"symbol"}],"scales":[{"domain":{"data":"chart","field":"x"},"name":"x","nice":true,"range":"width","type":"linear","zero":false},{"domain":{"data":"chart","field":"y"},"name":"y","nice":true,"range":"height","type":"linear","zero":false},{"domain":{"data":"chart","field":"series"},"name":"color","range":"category10","type":"ordinal"}],"version":2,"width":450}</graph>

Bir nechta maʼlumotlar seriyasi mavjud boʻlsa, legendlar qoʻshilishi mumkin:

{{Graph:Chart
 | width=400
 | height=150
 | xAxisTitle=X
 | yAxisTitle=Y
 | legend=Legend
 | y1Title=Blue
 | y2Title=Orange
 | type=line
 | x=1,2,3,4,5,6,7,8
 | y1=10,12,6,14,2,10,7,9
 | y2=2,4,6,8,13,11,9,2
}}

<graph>{"axes":[{"format":"d","grid":false,"properties":{"axis":{"stroke":{"value":"#54595d"},"strokeWidth":{"value":2}},"grid":{"stroke":{"value":"#54595d"}},"labels":{"fill":{"value":"#54595d"}},"ticks":{"stroke":{"value":"#54595d"}},"title":{"fill":{"value":"#54595d"}}},"scale":"x","title":"X","type":"x"},{"format":"d","grid":false,"properties":{"axis":{"stroke":{"value":"#54595d"},"strokeWidth":{"value":2}},"grid":{"stroke":{"value":"#54595d"}},"labels":{"fill":{"value":"#54595d"}},"ticks":{"stroke":{"value":"#54595d"}},"title":{"fill":{"value":"#54595d"}}},"scale":"y","title":"Y","type":"y"}],"data":[{"format":{"parse":{"x":"integer","y":"integer"},"type":"json"},"name":"chart","values":[{"series":"Blue","x":1,"y":10},{"series":"Blue","x":2,"y":12},{"series":"Blue","x":3,"y":6},{"series":"Blue","x":4,"y":14},{"series":"Blue","x":5,"y":2},{"series":"Blue","x":6,"y":10},{"series":"Blue","x":7,"y":7},{"series":"Blue","x":8,"y":9},{"series":"Orange","x":1,"y":2},{"series":"Orange","x":2,"y":4},{"series":"Orange","x":3,"y":6},{"series":"Orange","x":4,"y":8},{"series":"Orange","x":5,"y":13},{"series":"Orange","x":6,"y":11},{"series":"Orange","x":7,"y":9},{"series":"Orange","x":8,"y":2}]}],"height":150,"legends":[{"fill":"color","properties":{"labels":{"fill":{"value":"#54595d"}},"title":{"fill":{"value":"#54595d"}}},"stroke":"color","title":"Legend"}],"marks":[{"from":{"data":"chart","transform":[{"groupby":["series"],"type":"facet"}]},"marks":[{"properties":{"enter":{"stroke":{"field":"series","scale":"color"},"strokeWidth":{"value":2.5},"x":{"field":"x","scale":"x"},"y":{"field":"y","scale":"y"}},"hover":{"stroke":{"value":"red"}},"update":{"stroke":{"field":"series","scale":"color"}}},"type":"line"}],"type":"group"}],"scales":[{"domain":{"data":"chart","field":"x"},"name":"x","nice":true,"range":"width","type":"linear","zero":false},{"domain":{"data":"chart","field":"y"},"name":"y","nice":true,"range":"height","type":"linear","zero":false},{"domain":{"data":"chart","field":"series"},"name":"color","range":"category10","type":"ordinal"}],"version":2,"width":400}</graph>

Parametrni boʻsh qoldirish orqali sarlavha qoldirilishi mumkin:

{{Graph:Chart
 | width=400
 | height=150
 | xAxisTitle=X
 | yAxisTitle=Y
 | legend=
 | y1Title=Blue
 | y2Title=Orange
 | type=line
 | x=1,2,3,4,5,6,7,8
 | y1=10,12,6,14,2,10,7,9
 | y2=2,4,6,8,13,11,9,2
}}

<graph>{"axes":[{"format":"d","grid":false,"properties":{"axis":{"stroke":{"value":"#54595d"},"strokeWidth":{"value":2}},"grid":{"stroke":{"value":"#54595d"}},"labels":{"fill":{"value":"#54595d"}},"ticks":{"stroke":{"value":"#54595d"}},"title":{"fill":{"value":"#54595d"}}},"scale":"x","title":"X","type":"x"},{"format":"d","grid":false,"properties":{"axis":{"stroke":{"value":"#54595d"},"strokeWidth":{"value":2}},"grid":{"stroke":{"value":"#54595d"}},"labels":{"fill":{"value":"#54595d"}},"ticks":{"stroke":{"value":"#54595d"}},"title":{"fill":{"value":"#54595d"}}},"scale":"y","title":"Y","type":"y"}],"data":[{"format":{"parse":{"x":"integer","y":"integer"},"type":"json"},"name":"chart","values":[{"series":"Blue","x":1,"y":10},{"series":"Blue","x":2,"y":12},{"series":"Blue","x":3,"y":6},{"series":"Blue","x":4,"y":14},{"series":"Blue","x":5,"y":2},{"series":"Blue","x":6,"y":10},{"series":"Blue","x":7,"y":7},{"series":"Blue","x":8,"y":9},{"series":"Orange","x":1,"y":2},{"series":"Orange","x":2,"y":4},{"series":"Orange","x":3,"y":6},{"series":"Orange","x":4,"y":8},{"series":"Orange","x":5,"y":13},{"series":"Orange","x":6,"y":11},{"series":"Orange","x":7,"y":9},{"series":"Orange","x":8,"y":2}]}],"height":150,"legends":[{"fill":"color","properties":{"labels":{"fill":{"value":"#54595d"}},"title":{"fill":{"value":"#54595d"}}},"stroke":"color","title":""}],"marks":[{"from":{"data":"chart","transform":[{"groupby":["series"],"type":"facet"}]},"marks":[{"properties":{"enter":{"stroke":{"field":"series","scale":"color"},"strokeWidth":{"value":2.5},"x":{"field":"x","scale":"x"},"y":{"field":"y","scale":"y"}},"hover":{"stroke":{"value":"red"}},"update":{"stroke":{"field":"series","scale":"color"}}},"type":"line"}],"type":"group"}],"scales":[{"domain":{"data":"chart","field":"x"},"name":"x","nice":true,"range":"width","type":"linear","zero":false},{"domain":{"data":"chart","field":"y"},"name":"y","nice":true,"range":"height","type":"linear","zero":false},{"domain":{"data":"chart","field":"series"},"name":"color","range":"category10","type":"ordinal"}],"version":2,"width":400}</graph>

Uzun legend yozuvlar noqulay koʻrinishi mumkin. Legend parametrini qoldirib, uning oʻrniga {{Legend}} (yoki shunga oʻxshash shablon) dan foydalanish yaxshiroq boʻlishi mumkin:

{{Graph:Chart
 | width=400
 | height=150
 | xAxisTitle=X
 | yAxisTitle=Y
 | colors=darkred, gold
 | type=line
 | x=1,2,3,4,5,6,7,8
 | y1=10,12,6,14,2,10,7,9
 | y2=2,4,6,8,13,11,9,2
}}
{{legend|darkred|This is a long legend entry and wouldn't look so good if it was part of the graph itself.}}
{{legend|gold|This is another fairly long entry.}}

<graph>{"axes":[{"format":"d","grid":false,"properties":{"axis":{"stroke":{"value":"#54595d"},"strokeWidth":{"value":2}},"grid":{"stroke":{"value":"#54595d"}},"labels":{"fill":{"value":"#54595d"}},"ticks":{"stroke":{"value":"#54595d"}},"title":{"fill":{"value":"#54595d"}}},"scale":"x","title":"X","type":"x"},{"format":"d","grid":false,"properties":{"axis":{"stroke":{"value":"#54595d"},"strokeWidth":{"value":2}},"grid":{"stroke":{"value":"#54595d"}},"labels":{"fill":{"value":"#54595d"}},"ticks":{"stroke":{"value":"#54595d"}},"title":{"fill":{"value":"#54595d"}}},"scale":"y","title":"Y","type":"y"}],"data":[{"format":{"parse":{"x":"integer","y":"integer"},"type":"json"},"name":"chart","values":[{"series":"y1","x":1,"y":10},{"series":"y1","x":2,"y":12},{"series":"y1","x":3,"y":6},{"series":"y1","x":4,"y":14},{"series":"y1","x":5,"y":2},{"series":"y1","x":6,"y":10},{"series":"y1","x":7,"y":7},{"series":"y1","x":8,"y":9},{"series":"y2","x":1,"y":2},{"series":"y2","x":2,"y":4},{"series":"y2","x":3,"y":6},{"series":"y2","x":4,"y":8},{"series":"y2","x":5,"y":13},{"series":"y2","x":6,"y":11},{"series":"y2","x":7,"y":9},{"series":"y2","x":8,"y":2}]}],"height":150,"legends":[],"marks":[{"from":{"data":"chart","transform":[{"groupby":["series"],"type":"facet"}]},"marks":[{"properties":{"enter":{"stroke":{"field":"series","scale":"color"},"strokeWidth":{"value":2.5},"x":{"field":"x","scale":"x"},"y":{"field":"y","scale":"y"}},"hover":{"stroke":{"value":"red"}},"update":{"stroke":{"field":"series","scale":"color"}}},"type":"line"}],"type":"group"}],"scales":[{"domain":{"data":"chart","field":"x"},"name":"x","nice":true,"range":"width","type":"linear","zero":false},{"domain":{"data":"chart","field":"y"},"name":"y","nice":true,"range":"height","type":"linear","zero":false},{"domain":{"data":"chart","field":"series"},"name":"color","range":["darkred","gold"],"type":"ordinal"}],"version":2,"width":400}</graph>

  This is a long legend entry and wouldn't look so good if it was part of the graph itself.
  This is another fairly long entry.


Bu usul, shuningdek, wiki formatlash va havolalar kiritish foydalanish imkonini beradi. Standart ranglardan foydalanadigan grafiklar afsona shablonlarida olti burchakli qiymatlarni koʻrsatishi kerak:

  #1f77b4
  #ff7f0e
  #2ca02c
  #d62728
  #9467bd
  #8c564b
  #e377c2
  #7f7f7f
  #bcbd22
  #17becf

Shu bilan bir qatorda, CSS rang nomlari (yoki olti burchakli qiymatlar) grafik va afsona shablonlarida koʻrsatilishi mumkin.

Annotatsiyalar

[tahrir | manbasini tahrirlash]

Faqat gorizontal izohli chiziqli diagramma:

{{Graph:Chart
|hannotatonslabel=label4, label5, label6
|hannotatonsline=4, 5, 6
|linewidths=2,4,0
|showSymbols=3,3,3
|symbolsShape=triangle_up, cross, cross
|type=line
|x=0,1,2,3
|y1=0,3.342,2.3423,5.32423|y2=1,2.342,4.63,2.32423|y3=3,1.342,2.63,6.32423}}

<graph>{"axes":[{"format":"d","grid":false,"properties":{"axis":{"stroke":{"value":"#54595d"},"strokeWidth":{"value":2}},"grid":{"stroke":{"value":"#54595d"}},"labels":{"fill":{"value":"#54595d"}},"ticks":{"stroke":{"value":"#54595d"}},"title":{"fill":{"value":"#54595d"}}},"scale":"x","type":"x"},{"grid":false,"properties":{"axis":{"stroke":{"value":"#54595d"},"strokeWidth":{"value":2}},"grid":{"stroke":{"value":"#54595d"}},"labels":{"fill":{"value":"#54595d"}},"ticks":{"stroke":{"value":"#54595d"}},"title":{"fill":{"value":"#54595d"}}},"scale":"y","type":"y"}],"data":[{"format":{"parse":{"x":"integer","y":"number"},"type":"json"},"name":"chart","values":[{"series":"y1","x":0,"y":0},{"series":"y1","x":1,"y":3.342},{"series":"y1","x":2,"y":2.3423},{"series":"y1","x":3,"y":5.32423},{"series":"y2","x":0,"y":1},{"series":"y2","x":1,"y":2.342},{"series":"y2","x":2,"y":4.63},{"series":"y2","x":3,"y":2.32423},{"series":"y3","x":0,"y":3},{"series":"y3","x":1,"y":1.342},{"series":"y3","x":2,"y":2.63},{"series":"y3","x":3,"y":6.32423}]},{"format":{"parse":{"y":"number"},"type":"json"},"name":"h_anno","values":[{"label":"label4","y":"4"},{"label":"label5","y":"5"},{"label":"label6","y":"6"}]}],"height":200,"legends":[],"marks":[{"from":{"data":"chart","transform":[{"groupby":["series"],"type":"facet"}]},"marks":[{"properties":{"enter":{"stroke":{"field":"series","scale":"color"},"strokeWidth":{"field":"series","scale":"line"},"x":{"field":"x","scale":"x"},"y":{"field":"y","scale":"y"}},"hover":{"stroke":{"value":"red"}},"update":{"stroke":{"field":"series","scale":"color"}}},"type":"line"},{"properties":{"enter":{"fill":{"field":"series","scale":"color"},"shape":{"field":"series","scale":"symShape"},"size":{"field":"series","scale":"symSize"},"stroke":{"field":"series","scale":"color"},"strokeWidth":{"value":0},"x":{"field":"x","scale":"x"},"y":{"field":"y","scale":"y"}}},"type":"symbol"}],"type":"group"},{"from":{"data":"h_anno"},"properties":{"update":{"opacity":{"value":0.75},"stroke":{"value":"#54595d"},"strokeWidth":{"value":"#54595d"},"x":{"value":0},"x2":{"field":{"group":"width"}},"y":{"field":"y","scale":"y"}}},"type":"rule"},{"from":{"data":"h_anno"},"properties":{"update":{"angle":{"value":0},"baseline":{"value":"top"},"fill":{"value":"#54595d"},"opacity":{"value":0.75},"text":{"field":"label"},"x":{"offset":3,"value":0},"y":{"field":"y","offset":3,"scale":"y"}}},"type":"text"}],"scales":[{"domain":{"data":"chart","field":"x"},"name":"x","nice":true,"range":"width","type":"linear","zero":false},{"domain":{"data":"chart","field":"y"},"name":"y","nice":true,"range":"height","type":"linear","zero":false},{"domain":{"data":"chart","field":"series"},"name":"color","range":"category10","type":"ordinal"},{"domain":{"data":"chart","field":"series"},"name":"line","range":[2,4,0],"type":"ordinal"},{"domain":{"data":"chart","field":"series"},"name":"symSize","range":[34,136,76.5],"type":"ordinal"},{"domain":{"data":"chart","field":"series"},"name":"symShape","range":["triangle-up","cross","square"],"type":"ordinal"}],"version":2,"width":200}</graph>

Faqat vertikal izohli hudud diagrammasi

{{Graph:Chart
|vAnnotatonsLine=1, 2, 3 
|vAnnotatonsLabel=label1, label2, label3
|colors=#ffff5ba0, #641050ff, #ffaaff00
|type=area
|x=0,1,2,3
|y3=0,3.342,2.3423,5.32423|y2=1,2.342,4.63,2.32423|y1=3,1.342,2.63,6.32423}}

<graph>{"axes":[{"format":"d","grid":false,"properties":{"axis":{"stroke":{"value":"#54595d"},"strokeWidth":{"value":2}},"grid":{"stroke":{"value":"#54595d"}},"labels":{"fill":{"value":"#54595d"}},"ticks":{"stroke":{"value":"#54595d"}},"title":{"fill":{"value":"#54595d"}}},"scale":"x","type":"x"},{"grid":false,"properties":{"axis":{"stroke":{"value":"#54595d"},"strokeWidth":{"value":2}},"grid":{"stroke":{"value":"#54595d"}},"labels":{"fill":{"value":"#54595d"}},"ticks":{"stroke":{"value":"#54595d"}},"title":{"fill":{"value":"#54595d"}}},"scale":"y","type":"y"}],"data":[{"format":{"parse":{"x":"integer","y":"number"},"type":"json"},"name":"chart","values":[{"series":"y1","x":0,"y":3},{"series":"y1","x":1,"y":1.342},{"series":"y1","x":2,"y":2.63},{"series":"y1","x":3,"y":6.32423},{"series":"y2","x":0,"y":1},{"series":"y2","x":1,"y":2.342},{"series":"y2","x":2,"y":4.63},{"series":"y2","x":3,"y":2.32423},{"series":"y3","x":0,"y":0},{"series":"y3","x":1,"y":3.342},{"series":"y3","x":2,"y":2.3423},{"series":"y3","x":3,"y":5.32423}]},{"format":{"parse":{"x":"integer"},"type":"json"},"name":"v_anno","values":[{"label":"label1","x":"1"},{"label":"label2","x":"2"},{"label":"label3","x":"3"}]}],"height":200,"legends":[],"marks":[{"from":{"data":"chart","transform":[{"groupby":["series"],"type":"facet"}]},"marks":[{"properties":{"enter":{"fill":{"field":"series","scale":"color"},"x":{"field":"x","scale":"x"},"y":{"field":"y","scale":"y"},"y2":{"scale":"y","value":0}},"hover":{"fill":{"value":"red"}},"update":{"fill":{"field":"series","scale":"color"},"fillOpacity":{"field":"series","scale":"transparency"}}},"type":"area"}],"type":"group"},{"from":{"data":"v_anno"},"properties":{"update":{"opacity":{"value":0.75},"stroke":{"value":"#54595d"},"strokeWidth":{"value":"#54595d"},"x":{"field":"x","scale":"x"},"y":{"value":0},"y2":{"field":{"group":"height"}}}},"type":"rule"},{"from":{"data":"v_anno"},"properties":{"update":{"angle":{"value":-90},"baseline":{"value":"top"},"fill":{"value":"#54595d"},"opacity":{"value":0.75},"text":{"field":"label"},"x":{"field":"x","offset":3,"scale":"x"},"y":{"field":{"group":"height"},"offset":-3}}},"type":"text"}],"scales":[{"domain":{"data":"chart","field":"x"},"name":"x","nice":true,"range":"width","type":"linear","zero":false},{"domain":{"data":"chart","field":"y"},"name":"y","nice":true,"range":"height","type":"linear","zero":true},{"domain":{"data":"chart","field":"series"},"name":"color","range":["#ff5ba0","#1050ff","#aaff00"],"type":"ordinal"},{"name":"transparency","range":["1","0.3921568627451","1"],"type":"ordinal"}],"version":2,"width":200}</graph>

Diagrammani {{tasvir ramkasi}} ichiga qoʻyish grafikning suzishiga imkon beradi va matn uning atrofida oʻralishi mumkin:

{{Image frame 
 | caption=Line chart 
 | content = {{Graph:Chart
   | width=400
   | height=150
   | type=line
   | yAxisMin = -1
   | x=1,2,3,4,5,6,7,8|y=10,12,6,14,2,10,7,9
  }} 
}}
<graph>{"axes":[{"format":"d","grid":false,"properties":{"axis":{"stroke":{"value":"#54595d"},"strokeWidth":{"value":2}},"grid":{"stroke":{"value":"#54595d"}},"labels":{"fill":{"value":"#54595d"}},"ticks":{"stroke":{"value":"#54595d"}},"title":{"fill":{"value":"#54595d"}}},"scale":"x","type":"x"},{"format":"d","grid":false,"properties":{"axis":{"stroke":{"value":"#54595d"},"strokeWidth":{"value":2}},"grid":{"stroke":{"value":"#54595d"}},"labels":{"fill":{"value":"#54595d"}},"ticks":{"stroke":{"value":"#54595d"}},"title":{"fill":{"value":"#54595d"}}},"scale":"y","type":"y"}],"data":[{"format":{"parse":{"x":"integer","y":"integer"},"type":"json"},"name":"chart","values":[{"series":"y","x":1,"y":10},{"series":"y","x":2,"y":12},{"series":"y","x":3,"y":6},{"series":"y","x":4,"y":14},{"series":"y","x":5,"y":2},{"series":"y","x":6,"y":10},{"series":"y","x":7,"y":7},{"series":"y","x":8,"y":9}]}],"height":150,"legends":[],"marks":[{"from":{"data":"chart"},"properties":{"enter":{"stroke":{"field":"series","scale":"color"},"strokeWidth":{"value":2.5},"x":{"field":"x","scale":"x"},"y":{"field":"y","scale":"y"}},"hover":{"stroke":{"value":"red"}},"update":{"stroke":{"field":"series","scale":"color"}}},"type":"line"}],"scales":[{"domain":{"data":"chart","field":"x"},"name":"x","nice":true,"range":"width","type":"linear","zero":false},{"clamp":true,"domain":{"data":"chart","field":"y"},"domainMin":-1,"name":"y","nice":true,"range":"height","type":"linear","zero":false},{"domain":{"data":"chart","field":"series"},"name":"color","range":"category10","type":"ordinal"}],"version":2,"width":400}</graph>
Line chart


Diagramma ustiga sarlavha va diagramma ostidagi manba havolalarini qoʻshish uchun {{tasvir ramkasi}} ichida |pos=top dan foydalanish mumkin.