Шаблон:Graph:Lines: відмінності між версіями

[неперевірена версія][неперевірена версія]
Вилучено вміст Додано вміст
Bouzinac (обговорення | внесок)
Створена сторінка: <includeonly>{{#tag:{{#if:{{{debug|}}}|syntaxhighlight|graph}}|</includeonly><noinclude>{{documentation}}<syntaxhighlight lang=html><graph></syntaxhighlight>{{#...
 
Yurik (обговорення | внесок)
Copying 2 changes by Bouzinac,Timbaaa: Syncing from sandbox - with two new parameters from mw:Template:Graph:Lines. (docs)
Рядок 1:
<includeonly>{{#tag:{{#if:{{{debug|}}}|syntaxhighlight|graph}}|</includeonly><noinclude>{{documentationДокументація}}<syntaxhighlight lang=html><graph mode="interactive" title=""></syntaxhighlight>{{#tag:syntaxhighlight|</noinclude>
{
//
Рядок 37:
| "datum.{{{xField}}}"
}}
},
, {"type": "sort", "by": ["_xfield"]},
{{#if:{{{series|}}}
| , {"type": "fold", "fields": [{{{series}}}]}
}}
{{#if:{{{replaceZerosWith|}}}
| , {"type": "formula", "field": "_yfield", "expr": "max(datum.{{#if:{{{series|}}}|value|{{{value|value}}}}}, {{{replaceZerosWith}}})" }
| , {"type": "formula", "field": "_yfield", "expr": "datum.{{#if:{{{series|}}}|value|{{{value|value}}}}}" }
}}
{{#ifeq:{{{yScale|}}}|log
| , {"type": "filter", "test": "datum._yfield != 0"}
}}
]
Рядок 67 ⟶ 74:
{
"name": "y",
"type": "{{{yScale|linear}}}",
"range": "height",
"domain": {"data": "chart", "field": "{{{value|value}}}_yfield"},
{{#if:{{{yZero|}}}|"zero": {{{yZero}}},}}
{{#if:{{{yMin|}}}|"domainMin": {{{yMin}}},}}
Рядок 129 ⟶ 136:
"properties": {
"enter": {
"y": {"scale": "y", "field": "{{{value|value}}}_yfield"},
"x": {"scale": "x", "field": "_xfield"},
"stroke": {"scale": "color", "field": "{{{group|key}}}"},