« Modèle:Graph:PageViews » : différence entre les versions

Contenu supprimé Contenu ajouté
Yurik (discussion | contributions)
Aucun résumé des modifications
Lofhi (discussion | contributions)
version importée depuis meta:Template:Graph:PageViews : mise à jour
Ligne 9 :
 
"version": 2,
"width": {{{width|400800}}},
"height": {{{height|200}}},
 
Ligne 16 :
{
"name": "pageviews",
"url": "wikirest://wikimedia.org/api/rest_v1/metrics/pageviews/{{#ifeq: {{#iferror: {{#expr: {{{1|}}} + 1 }} | {{{1|}}} | {{{2|}}} }} | _ | aggregate | per-article }}/{{trim|{{#ifeq: {{#iferror: {{#expr: {{{1|}}} + 1 }} | {{#iferror: {{#expr: {{{2|}}} + 1 }} | {{{2|{{SERVERNAME}}}}} | {{{3|{{SERVERNAME}}}}} }} | {{{3|{{SERVERNAME}}}}} }} | www.mediawiki.org | mediawiki.org | {{#iferror: {{#expr: {{{1|}}} + 1 }} | {{#iferror: {{#expr: {{{2|}}} + 1 }} | {{{2|{{SERVERNAME}}}}} | {{{3|{{SERVERNAME}}}}} }} | {{{3|{{SERVERNAME}}}}} }} }}}}/{{{platform|all-access}}}/user/{{#ifeq: {{#iferror: {{#expr: {{{1|}}} + 1 }} | {{{1|}}} | {{{2|}}} }} | _
| {{{granularity | monthly}}}
| {{urlencode:{{#titleparts: {{#iferror: {2{#expr: {{{1|}}} + 1 }} | {{{1|{{ARTICLEPAGENAME}}}}} | {{{2|{{ARTICLEPAGENAME}}}}} }} }}|PATH}}/daily
}}/{{formatnum:{{#time: Ymd | -{{#iferror: {{#expr: {{{1|}}} + 1 }} | {{#iferror: {{#expr: {{{2|}}} + 1 }} | {{{3|30}}} | {{{2|30}}} }} | {{{1|30}}} }} days }}|R}}00/{{formatnum:{{#time: Ymd }}|R}}00",
"format": {
"type": "json",
Ligne 61 :
// Simple axis with horizontal grid lines
"axes": [
{
"type": "x",
"scale": "x",
"ticks": 5},
"properties": {
{"type": "y", "scale": "y", "ticks": 5, "grid": true}
"ticks": {"stroke": {"value": "#54595d"} },
"labels": {"fill": {"value": "#54595d"} },
"axis": {"stroke": {"value": "#54595d"}, "strokeWidth": {"value": 2} }
}
},
{
"type": "y",
"scale": "y",
"ticks": 5,
"grid": true,
"properties": {
"ticks": {"stroke": {"value": "#54595d"} },
"labels": {"fill": {"value": "#54595d"} },
"grid": {"stroke": {"value": "#54595d"}, "strokeWidth": {"value": 2} },
"axis": {"stroke": {"value": "#54595d"}, "strokeWidth": {"value": 2} }
}
}
],
 
Ligne 74 ⟶ 94 :
"x": {"scale": "x","field": "date"},
"y": {"scale": "y","field": "views"},
"stroke": {"value": "{{{color|#00f36c}}}"},
"strokeWidth": {"value": 3},
"interpolate": {"value": "{{{interpolate|monotonestep-after}}}"}
}
}
Ligne 88 ⟶ 108 :
"y": {"scale": "y","value": 0},
"y2": {"scale": "y","field": "views"},
"fill": {"value": "{{{color|#00f36c}}}"},
"fillOpacity": {"value": 0.35},
"interpolate": {"value": "{{{interpolate|monotonestep-after}}}"}
}
}