תבנית:PageViews graph/תיעוד

מתוך אקו-ויקי, מקום מפגש בנושאי אקולוגיה, חברה וכלכלה.
קפיצה לניווט קפיצה לחיפוש


This graph's main version resides at mediawiki Template:Graph:PageViews. Please make all the changes there and copy it everywhere else (until the copying is automated)

{{ PageViews graph }}
30 days for the current page (if there is data)
{{ PageViews graph | 90 | Main Page | en.wikipedia.org }}
90 days for Main Page on English Wikipedia
<graph>

{

 //
 // ATTENTION: This code is maintained at https://www.mediawiki.org/wiki/Template:Graph:PageViews
 //            Please do not modify it anywhere else, as it may get copied and override your changes.
 //            Suggestions can be made at https://www.mediawiki.org/wiki/Template_talk:Graph:PageViews
 //            The graph uses PageViews API https://wikitech.wikimedia.org/wiki/Analytics/PageviewAPI
 //
 "version": 2,
 "width": 400,
 "height": 200,
 // The data for this graph comes from the PageView API.  The request is made for N days back up to now.
 "data": [
   {
     "name": "pageviews",
     "url": "wikirest://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/ecowiki.org.il/all-access/user/%D7%AA%D7%91%D7%A0%D7%99%D7%AA%3APageViews%20graph%2F%D7%AA%D7%99%D7%A2%D7%95%D7%93/daily/2024102400/2024112300",
     "format": {
       "type": "json",
       "property": "items"
     },
     // The response is parsed here, converting date strings of form "20160223" into date 2016-02-23
     "transform": [
       { "type": "formula", "field": "year", "expr": "parseInt(substring(datum.timestamp,0,4))" },
       { "type": "formula", "field": "month", "expr": "parseInt(substring(datum.timestamp,4,6))" },
       { "type": "formula", "field": "day", "expr": "parseInt(substring(datum.timestamp,6,8))" },
       { "type": "formula", "field": "date", "expr": "datetime(datum.year,datum.month-1,datum.day)" }
     ]
   }
 ],
 "scales": [
   // The dates are scaled to the "x" axis - the width of the graph
   {
     "name": "x",
     "type": "time",
     "range": "width",
     "domain": {"data": "pageviews","field": "date"}
   },
   // The pageviews are scaled to the "y" axis - the height of the graph
   // Optional scale parameter can change "linear" to other scales like log
   // Optional max parameter can fix the upper bound of the graph
   {
     "name": "y",
     "type": "linear",
     "range": "height",
     "domain": {"data": "pageviews","field": "views"},
     "clamp": true,
     "nice": true
   }
 ],
 // Simple axis with horizontal grid lines
 "axes": [
   {"type": "x", "scale": "x", "ticks": 5},
   {"type": "y", "scale": "y", "ticks": 5, "grid": true}
 ],
 // The graph is drawn with two elements a thick line at the top, and a semi-transparent area below
 "marks": [
   {
     "type": "line",
     "from": {"data": "pageviews"},
     "properties": {
       "enter": {
         "x": {"scale": "x","field": "date"},
         "y": {"scale": "y","field": "views"},
         "stroke": {"value": "#00f"},
         "strokeWidth": {"value": 3},
         "interpolate": {"value": "monotone"}
       }
     }
   },
   {
     "type": "area",
     "from": {"data": "pageviews"},
     "properties": {
       "enter": {
         "x": {"scale": "x","field": "date"},
         "y": {"scale": "y","value": 0},
         "y2": {"scale": "y","field": "views"},
         "fill": {"value": "#00f"},
         "fillOpacity": {"value": 0.35},
         "interpolate": {"value": "monotone"}
       }
     }
   }
 ]

} </graph>

<graph>

{

 //
 // ATTENTION: This code is maintained at https://www.mediawiki.org/wiki/Template:Graph:PageViews
 //            Please do not modify it anywhere else, as it may get copied and override your changes.
 //            Suggestions can be made at https://www.mediawiki.org/wiki/Template_talk:Graph:PageViews
 //            The graph uses PageViews API https://wikitech.wikimedia.org/wiki/Analytics/PageviewAPI
 //
 "version": 2,
 "width": 400,
 "height": 200,
 // The data for this graph comes from the PageView API.  The request is made for N days back up to now.
 "data": [
   {
     "name": "pageviews",
     "url": "wikirest://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/en.wikipedia.org/all-access/user/Main%20Page/daily/2024082500/2024112300",
     "format": {
       "type": "json",
       "property": "items"
     },
     // The response is parsed here, converting date strings of form "20160223" into date 2016-02-23
     "transform": [
       { "type": "formula", "field": "year", "expr": "parseInt(substring(datum.timestamp,0,4))" },
       { "type": "formula", "field": "month", "expr": "parseInt(substring(datum.timestamp,4,6))" },
       { "type": "formula", "field": "day", "expr": "parseInt(substring(datum.timestamp,6,8))" },
       { "type": "formula", "field": "date", "expr": "datetime(datum.year,datum.month-1,datum.day)" }
     ]
   }
 ],
 "scales": [
   // The dates are scaled to the "x" axis - the width of the graph
   {
     "name": "x",
     "type": "time",
     "range": "width",
     "domain": {"data": "pageviews","field": "date"}
   },
   // The pageviews are scaled to the "y" axis - the height of the graph
   // Optional scale parameter can change "linear" to other scales like log
   // Optional max parameter can fix the upper bound of the graph
   {
     "name": "y",
     "type": "linear",
     "range": "height",
     "domain": {"data": "pageviews","field": "views"},
     "clamp": true,
     "nice": true
   }
 ],
 // Simple axis with horizontal grid lines
 "axes": [
   {"type": "x", "scale": "x", "ticks": 5},
   {"type": "y", "scale": "y", "ticks": 5, "grid": true}
 ],
 // The graph is drawn with two elements a thick line at the top, and a semi-transparent area below
 "marks": [
   {
     "type": "line",
     "from": {"data": "pageviews"},
     "properties": {
       "enter": {
         "x": {"scale": "x","field": "date"},
         "y": {"scale": "y","field": "views"},
         "stroke": {"value": "#00f"},
         "strokeWidth": {"value": 3},
         "interpolate": {"value": "monotone"}
       }
     }
   },
   {
     "type": "area",
     "from": {"data": "pageviews"},
     "properties": {
       "enter": {
         "x": {"scale": "x","field": "date"},
         "y": {"scale": "y","value": 0},
         "y2": {"scale": "y","field": "views"},
         "fill": {"value": "#00f"},
         "fillOpacity": {"value": 0.35},
         "interpolate": {"value": "monotone"}
       }
     }
   }
 ]

} </graph>

{{ PageViews graph | 180 | _ }}
Monthly visitors to the current wiki (last 6 months)
{{ PageViews graph | 180 | _ | all-projects | granularity = daily }}
Daily visitors to all worldwide wikis (last 6 months)
<graph>

{

 //
 // ATTENTION: This code is maintained at https://www.mediawiki.org/wiki/Template:Graph:PageViews
 //            Please do not modify it anywhere else, as it may get copied and override your changes.
 //            Suggestions can be made at https://www.mediawiki.org/wiki/Template_talk:Graph:PageViews
 //            The graph uses PageViews API https://wikitech.wikimedia.org/wiki/Analytics/PageviewAPI
 //
 "version": 2,
 "width": 400,
 "height": 200,
 // The data for this graph comes from the PageView API.  The request is made for N days back up to now.
 "data": [
   {
     "name": "pageviews",
     "url": "wikirest://wikimedia.org/api/rest_v1/metrics/pageviews/aggregate/ecowiki.org.il/all-access/user/monthly/2024052700/2024112300",
     "format": {
       "type": "json",
       "property": "items"
     },
     // The response is parsed here, converting date strings of form "20160223" into date 2016-02-23
     "transform": [
       { "type": "formula", "field": "year", "expr": "parseInt(substring(datum.timestamp,0,4))" },
       { "type": "formula", "field": "month", "expr": "parseInt(substring(datum.timestamp,4,6))" },
       { "type": "formula", "field": "day", "expr": "parseInt(substring(datum.timestamp,6,8))" },
       { "type": "formula", "field": "date", "expr": "datetime(datum.year,datum.month-1,datum.day)" }
     ]
   }
 ],
 "scales": [
   // The dates are scaled to the "x" axis - the width of the graph
   {
     "name": "x",
     "type": "time",
     "range": "width",
     "domain": {"data": "pageviews","field": "date"}
   },
   // The pageviews are scaled to the "y" axis - the height of the graph
   // Optional scale parameter can change "linear" to other scales like log
   // Optional max parameter can fix the upper bound of the graph
   {
     "name": "y",
     "type": "linear",
     "range": "height",
     "domain": {"data": "pageviews","field": "views"},
     "clamp": true,
     "nice": true
   }
 ],
 // Simple axis with horizontal grid lines
 "axes": [
   {"type": "x", "scale": "x", "ticks": 5},
   {"type": "y", "scale": "y", "ticks": 5, "grid": true}
 ],
 // The graph is drawn with two elements a thick line at the top, and a semi-transparent area below
 "marks": [
   {
     "type": "line",
     "from": {"data": "pageviews"},
     "properties": {
       "enter": {
         "x": {"scale": "x","field": "date"},
         "y": {"scale": "y","field": "views"},
         "stroke": {"value": "#00f"},
         "strokeWidth": {"value": 3},
         "interpolate": {"value": "monotone"}
       }
     }
   },
   {
     "type": "area",
     "from": {"data": "pageviews"},
     "properties": {
       "enter": {
         "x": {"scale": "x","field": "date"},
         "y": {"scale": "y","value": 0},
         "y2": {"scale": "y","field": "views"},
         "fill": {"value": "#00f"},
         "fillOpacity": {"value": 0.35},
         "interpolate": {"value": "monotone"}
       }
     }
   }
 ]

} </graph>

<graph>

{

 //
 // ATTENTION: This code is maintained at https://www.mediawiki.org/wiki/Template:Graph:PageViews
 //            Please do not modify it anywhere else, as it may get copied and override your changes.
 //            Suggestions can be made at https://www.mediawiki.org/wiki/Template_talk:Graph:PageViews
 //            The graph uses PageViews API https://wikitech.wikimedia.org/wiki/Analytics/PageviewAPI
 //
 "version": 2,
 "width": 400,
 "height": 200,
 // The data for this graph comes from the PageView API.  The request is made for N days back up to now.
 "data": [
   {
     "name": "pageviews",
     "url": "wikirest://wikimedia.org/api/rest_v1/metrics/pageviews/aggregate/all-projects/all-access/user/daily/2024052700/2024112300",
     "format": {
       "type": "json",
       "property": "items"
     },
     // The response is parsed here, converting date strings of form "20160223" into date 2016-02-23
     "transform": [
       { "type": "formula", "field": "year", "expr": "parseInt(substring(datum.timestamp,0,4))" },
       { "type": "formula", "field": "month", "expr": "parseInt(substring(datum.timestamp,4,6))" },
       { "type": "formula", "field": "day", "expr": "parseInt(substring(datum.timestamp,6,8))" },
       { "type": "formula", "field": "date", "expr": "datetime(datum.year,datum.month-1,datum.day)" }
     ]
   }
 ],
 "scales": [
   // The dates are scaled to the "x" axis - the width of the graph
   {
     "name": "x",
     "type": "time",
     "range": "width",
     "domain": {"data": "pageviews","field": "date"}
   },
   // The pageviews are scaled to the "y" axis - the height of the graph
   // Optional scale parameter can change "linear" to other scales like log
   // Optional max parameter can fix the upper bound of the graph
   {
     "name": "y",
     "type": "linear",
     "range": "height",
     "domain": {"data": "pageviews","field": "views"},
     "clamp": true,
     "nice": true
   }
 ],
 // Simple axis with horizontal grid lines
 "axes": [
   {"type": "x", "scale": "x", "ticks": 5},
   {"type": "y", "scale": "y", "ticks": 5, "grid": true}
 ],
 // The graph is drawn with two elements a thick line at the top, and a semi-transparent area below
 "marks": [
   {
     "type": "line",
     "from": {"data": "pageviews"},
     "properties": {
       "enter": {
         "x": {"scale": "x","field": "date"},
         "y": {"scale": "y","field": "views"},
         "stroke": {"value": "#00f"},
         "strokeWidth": {"value": 3},
         "interpolate": {"value": "monotone"}
       }
     }
   },
   {
     "type": "area",
     "from": {"data": "pageviews"},
     "properties": {
       "enter": {
         "x": {"scale": "x","field": "date"},
         "y": {"scale": "y","value": 0},
         "y2": {"scale": "y","field": "views"},
         "fill": {"value": "#00f"},
         "fillOpacity": {"value": 0.35},
         "interpolate": {"value": "monotone"}
       }
     }
   }
 ]

} </graph>

{{ PageViews graph | | Main Page | en.wikipedia.org}}
30 days for Main Page on English Wikipedia
{{ PageViews graph | | Main Page | en.wikipedia.org | platform = desktop}}
30 days for Main Page on English Wikipedia - desktop computer browsers
<graph>

{

 //
 // ATTENTION: This code is maintained at https://www.mediawiki.org/wiki/Template:Graph:PageViews
 //            Please do not modify it anywhere else, as it may get copied and override your changes.
 //            Suggestions can be made at https://www.mediawiki.org/wiki/Template_talk:Graph:PageViews
 //            The graph uses PageViews API https://wikitech.wikimedia.org/wiki/Analytics/PageviewAPI
 //
 "version": 2,
 "width": 400,
 "height": 200,
 // The data for this graph comes from the PageView API.  The request is made for N days back up to now.
 "data": [
   {
     "name": "pageviews",
     "url": "wikirest://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/en.wikipedia.org/all-access/user/Main%20Page/daily/2024102400/2024112300",
     "format": {
       "type": "json",
       "property": "items"
     },
     // The response is parsed here, converting date strings of form "20160223" into date 2016-02-23
     "transform": [
       { "type": "formula", "field": "year", "expr": "parseInt(substring(datum.timestamp,0,4))" },
       { "type": "formula", "field": "month", "expr": "parseInt(substring(datum.timestamp,4,6))" },
       { "type": "formula", "field": "day", "expr": "parseInt(substring(datum.timestamp,6,8))" },
       { "type": "formula", "field": "date", "expr": "datetime(datum.year,datum.month-1,datum.day)" }
     ]
   }
 ],
 "scales": [
   // The dates are scaled to the "x" axis - the width of the graph
   {
     "name": "x",
     "type": "time",
     "range": "width",
     "domain": {"data": "pageviews","field": "date"}
   },
   // The pageviews are scaled to the "y" axis - the height of the graph
   // Optional scale parameter can change "linear" to other scales like log
   // Optional max parameter can fix the upper bound of the graph
   {
     "name": "y",
     "type": "linear",
     "range": "height",
     "domain": {"data": "pageviews","field": "views"},
     "clamp": true,
     "nice": true
   }
 ],
 // Simple axis with horizontal grid lines
 "axes": [
   {"type": "x", "scale": "x", "ticks": 5},
   {"type": "y", "scale": "y", "ticks": 5, "grid": true}
 ],
 // The graph is drawn with two elements a thick line at the top, and a semi-transparent area below
 "marks": [
   {
     "type": "line",
     "from": {"data": "pageviews"},
     "properties": {
       "enter": {
         "x": {"scale": "x","field": "date"},
         "y": {"scale": "y","field": "views"},
         "stroke": {"value": "#00f"},
         "strokeWidth": {"value": 3},
         "interpolate": {"value": "monotone"}
       }
     }
   },
   {
     "type": "area",
     "from": {"data": "pageviews"},
     "properties": {
       "enter": {
         "x": {"scale": "x","field": "date"},
         "y": {"scale": "y","value": 0},
         "y2": {"scale": "y","field": "views"},
         "fill": {"value": "#00f"},
         "fillOpacity": {"value": 0.35},
         "interpolate": {"value": "monotone"}
       }
     }
   }
 ]

} </graph>

<graph>

{

 //
 // ATTENTION: This code is maintained at https://www.mediawiki.org/wiki/Template:Graph:PageViews
 //            Please do not modify it anywhere else, as it may get copied and override your changes.
 //            Suggestions can be made at https://www.mediawiki.org/wiki/Template_talk:Graph:PageViews
 //            The graph uses PageViews API https://wikitech.wikimedia.org/wiki/Analytics/PageviewAPI
 //
 "version": 2,
 "width": 400,
 "height": 200,
 // The data for this graph comes from the PageView API.  The request is made for N days back up to now.
 "data": [
   {
     "name": "pageviews",
     "url": "wikirest://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/en.wikipedia.org/desktop/user/Main%20Page/daily/2024102400/2024112300",
     "format": {
       "type": "json",
       "property": "items"
     },
     // The response is parsed here, converting date strings of form "20160223" into date 2016-02-23
     "transform": [
       { "type": "formula", "field": "year", "expr": "parseInt(substring(datum.timestamp,0,4))" },
       { "type": "formula", "field": "month", "expr": "parseInt(substring(datum.timestamp,4,6))" },
       { "type": "formula", "field": "day", "expr": "parseInt(substring(datum.timestamp,6,8))" },
       { "type": "formula", "field": "date", "expr": "datetime(datum.year,datum.month-1,datum.day)" }
     ]
   }
 ],
 "scales": [
   // The dates are scaled to the "x" axis - the width of the graph
   {
     "name": "x",
     "type": "time",
     "range": "width",
     "domain": {"data": "pageviews","field": "date"}
   },
   // The pageviews are scaled to the "y" axis - the height of the graph
   // Optional scale parameter can change "linear" to other scales like log
   // Optional max parameter can fix the upper bound of the graph
   {
     "name": "y",
     "type": "linear",
     "range": "height",
     "domain": {"data": "pageviews","field": "views"},
     "clamp": true,
     "nice": true
   }
 ],
 // Simple axis with horizontal grid lines
 "axes": [
   {"type": "x", "scale": "x", "ticks": 5},
   {"type": "y", "scale": "y", "ticks": 5, "grid": true}
 ],
 // The graph is drawn with two elements a thick line at the top, and a semi-transparent area below
 "marks": [
   {
     "type": "line",
     "from": {"data": "pageviews"},
     "properties": {
       "enter": {
         "x": {"scale": "x","field": "date"},
         "y": {"scale": "y","field": "views"},
         "stroke": {"value": "#00f"},
         "strokeWidth": {"value": 3},
         "interpolate": {"value": "monotone"}
       }
     }
   },
   {
     "type": "area",
     "from": {"data": "pageviews"},
     "properties": {
       "enter": {
         "x": {"scale": "x","field": "date"},
         "y": {"scale": "y","value": 0},
         "y2": {"scale": "y","field": "views"},
         "fill": {"value": "#00f"},
         "fillOpacity": {"value": 0.35},
         "interpolate": {"value": "monotone"}
       }
     }
   }
 ]

} </graph>

{{ PageViews graph | | Main Page | en.wikipedia.org | platform = mobile-web}}
30 days for Main Page on English Wikipedia - mobile browsers
{{ PageViews graph | | Main Page | en.wikipedia.org | platform = mobile-app}}
30 days for Main Page on English Wikipedia - mobile applications
<graph>

{

 //
 // ATTENTION: This code is maintained at https://www.mediawiki.org/wiki/Template:Graph:PageViews
 //            Please do not modify it anywhere else, as it may get copied and override your changes.
 //            Suggestions can be made at https://www.mediawiki.org/wiki/Template_talk:Graph:PageViews
 //            The graph uses PageViews API https://wikitech.wikimedia.org/wiki/Analytics/PageviewAPI
 //
 "version": 2,
 "width": 400,
 "height": 200,
 // The data for this graph comes from the PageView API.  The request is made for N days back up to now.
 "data": [
   {
     "name": "pageviews",
     "url": "wikirest://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/en.wikipedia.org/mobile-web/user/Main%20Page/daily/2024102400/2024112300",
     "format": {
       "type": "json",
       "property": "items"
     },
     // The response is parsed here, converting date strings of form "20160223" into date 2016-02-23
     "transform": [
       { "type": "formula", "field": "year", "expr": "parseInt(substring(datum.timestamp,0,4))" },
       { "type": "formula", "field": "month", "expr": "parseInt(substring(datum.timestamp,4,6))" },
       { "type": "formula", "field": "day", "expr": "parseInt(substring(datum.timestamp,6,8))" },
       { "type": "formula", "field": "date", "expr": "datetime(datum.year,datum.month-1,datum.day)" }
     ]
   }
 ],
 "scales": [
   // The dates are scaled to the "x" axis - the width of the graph
   {
     "name": "x",
     "type": "time",
     "range": "width",
     "domain": {"data": "pageviews","field": "date"}
   },
   // The pageviews are scaled to the "y" axis - the height of the graph
   // Optional scale parameter can change "linear" to other scales like log
   // Optional max parameter can fix the upper bound of the graph
   {
     "name": "y",
     "type": "linear",
     "range": "height",
     "domain": {"data": "pageviews","field": "views"},
     "clamp": true,
     "nice": true
   }
 ],
 // Simple axis with horizontal grid lines
 "axes": [
   {"type": "x", "scale": "x", "ticks": 5},
   {"type": "y", "scale": "y", "ticks": 5, "grid": true}
 ],
 // The graph is drawn with two elements a thick line at the top, and a semi-transparent area below
 "marks": [
   {
     "type": "line",
     "from": {"data": "pageviews"},
     "properties": {
       "enter": {
         "x": {"scale": "x","field": "date"},
         "y": {"scale": "y","field": "views"},
         "stroke": {"value": "#00f"},
         "strokeWidth": {"value": 3},
         "interpolate": {"value": "monotone"}
       }
     }
   },
   {
     "type": "area",
     "from": {"data": "pageviews"},
     "properties": {
       "enter": {
         "x": {"scale": "x","field": "date"},
         "y": {"scale": "y","value": 0},
         "y2": {"scale": "y","field": "views"},
         "fill": {"value": "#00f"},
         "fillOpacity": {"value": 0.35},
         "interpolate": {"value": "monotone"}
       }
     }
   }
 ]

} </graph>

<graph>

{

 //
 // ATTENTION: This code is maintained at https://www.mediawiki.org/wiki/Template:Graph:PageViews
 //            Please do not modify it anywhere else, as it may get copied and override your changes.
 //            Suggestions can be made at https://www.mediawiki.org/wiki/Template_talk:Graph:PageViews
 //            The graph uses PageViews API https://wikitech.wikimedia.org/wiki/Analytics/PageviewAPI
 //
 "version": 2,
 "width": 400,
 "height": 200,
 // The data for this graph comes from the PageView API.  The request is made for N days back up to now.
 "data": [
   {
     "name": "pageviews",
     "url": "wikirest://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/en.wikipedia.org/mobile-app/user/Main%20Page/daily/2024102400/2024112300",
     "format": {
       "type": "json",
       "property": "items"
     },
     // The response is parsed here, converting date strings of form "20160223" into date 2016-02-23
     "transform": [
       { "type": "formula", "field": "year", "expr": "parseInt(substring(datum.timestamp,0,4))" },
       { "type": "formula", "field": "month", "expr": "parseInt(substring(datum.timestamp,4,6))" },
       { "type": "formula", "field": "day", "expr": "parseInt(substring(datum.timestamp,6,8))" },
       { "type": "formula", "field": "date", "expr": "datetime(datum.year,datum.month-1,datum.day)" }
     ]
   }
 ],
 "scales": [
   // The dates are scaled to the "x" axis - the width of the graph
   {
     "name": "x",
     "type": "time",
     "range": "width",
     "domain": {"data": "pageviews","field": "date"}
   },
   // The pageviews are scaled to the "y" axis - the height of the graph
   // Optional scale parameter can change "linear" to other scales like log
   // Optional max parameter can fix the upper bound of the graph
   {
     "name": "y",
     "type": "linear",
     "range": "height",
     "domain": {"data": "pageviews","field": "views"},
     "clamp": true,
     "nice": true
   }
 ],
 // Simple axis with horizontal grid lines
 "axes": [
   {"type": "x", "scale": "x", "ticks": 5},
   {"type": "y", "scale": "y", "ticks": 5, "grid": true}
 ],
 // The graph is drawn with two elements a thick line at the top, and a semi-transparent area below
 "marks": [
   {
     "type": "line",
     "from": {"data": "pageviews"},
     "properties": {
       "enter": {
         "x": {"scale": "x","field": "date"},
         "y": {"scale": "y","field": "views"},
         "stroke": {"value": "#00f"},
         "strokeWidth": {"value": 3},
         "interpolate": {"value": "monotone"}
       }
     }
   },
   {
     "type": "area",
     "from": {"data": "pageviews"},
     "properties": {
       "enter": {
         "x": {"scale": "x","field": "date"},
         "y": {"scale": "y","value": 0},
         "y2": {"scale": "y","field": "views"},
         "fill": {"value": "#00f"},
         "fillOpacity": {"value": 0.35},
         "interpolate": {"value": "monotone"}
       }
     }
   }
 ]

} </graph>

<templatedata> { "params": { "1": { "type": "number", "default": "30", "label": { "en": "Number of days back", "fr": "Nombre de jours", "hu": "Napok száma", "he": "מספר ימים אחורה" }, "description": { "en": "Number of days back to show in the chart", "fr": "Nombre de jour à montrer sur le graphique", "hu": "A grafikonon megjelenítendő legutóbbi napok száma", "he": "מספר ימים אחורה להצגת המידע" } }, "2": { "label": { "en": "Page Title", "fr": "Titre de la page", "hu": "Lapcím", "he": "דף" }, "description": { "en": "Title of the page, with namespace, including needed spaces. If '_' is given, shows the total for the whole site", "fr": "Titre de la page, avec l'espace de nom, incluant d'éventuels des espaces si nécessaire. Si '_' est passé, montre le total pour l'ensemble du site", "hu": "A lap címe névtérrel és megfelelő szóközökkel. Ha az értéke „_”, akkor az egész wikire vonatkozóan jeleníti meg a statisztikát.", "he": "שם הדף. הצבת '_' נותנת מידע על כל הדפים באקו-ויקי יחד" }, "type": "wiki-page-name", "default": { "en": "Name of the current article page (even if on talk page)", "fr": "Nom de l'article courent (même si posé sur une page de discussion)", "hu": "Az aktuális laphoz tartozó tartalmi lap címe (szócikk címe a vitalapján is)", "he": "הדף הנוכחי (בדף השיחה מוצג מידע על דף התוכן התואם)" }, "example": { "en": "Main Page", "fr": "Main Page", "hu": "Kezdőlap", "he": "אקו-ויקי:מזנון" } }, "3": { "label": { "en": "Domain", "fr": "Domaine", "hu": "wiki", "he": "אתר" }, "default": { "en": "Current wiki", "fr": "Wiki actuel", "hu": "aktuális wiki", "he": "אקו-ויקי העברית" }, "example": "en.wikipedia.org", "type": "string", "description": { "en": "Domain from which to find page views for the given title, if not this wiki. If '_' is given as parameter 2, 'all-projects' can be used here for all wiki sites summary data", "fr": "Domaine à partir duquel trouver les statistiques de visualisation de pages pour le titre donné, si ce n'est pas sur le wiki courant. Si '_' est passé en second paramètre, 'all-projects' peut être utilisé pour obtenir les données de tous les wikis.", "hu": "A lekérdezendő wiki domainneve (ha nem az aktuális). Ha a második paraméter „_”, akkor lehet „all-projects” az összes wiki összefoglaló adatainak megjelenítéséhez", "he": "אתר ויקי בו נמצא הדף, אם לא בוויקיעברית. במידה והפרמטר השני הוא '_', ניתן להשתמש בפרמטר הזה בערך 'all-projects' כדי לראות סיכום של כל אתרי ויקי בעולם" } }, "color": { "label": { "en": "Graph color", "fr": "Couleur du graph", "hu": "Grafikon színe", "he": "צבע הגרף" }, "default": "#00f", "example": "#f00", "type": "string", "description": { "en": "Shade with which to highlight the data in the chart", "fr": "Couleur avec laquelle mettre en avant les données dans le graph", "hu": "A grafikon vonalának a színe", "he": "צבע המידע בגרף" } }, "scale": { "label": { "en": "Graph scale", "fr": "Échelle du graph", "hu": "Grafikon skálázása", "he": "סולם מדידה" }, "description": { "en": "Scaling could be one of these: linear, log, pow, sqrt, quantile, quantize, and threshold", "fr": "L'échelle peut être l'une de celles-ci : linear, log, pow, sqrt, quantile, quantize et threshold", "hu": "A skálázás a következők egyike lehet: linear, log, pow, sqrt, quantile, quantize és threshold", "he": "אחד מאלו: linear, log, pow, sqrt, quantile, quantize, threshold" }, "default": "linear", "example": "log", "type": "string" }, "max": { "label": { "en": "Maximum Y value axis", "fr": "Valeur maximum de l'axe Y", "hu": "Y tengely maximuma", "he": "ערך Y מקסימלי" }, "description": { "en": "This optional value might be useful to align multiple graphs side-by-side", "fr": "Cette valeur optionnelle peut être utile pour aligner plusieurs graphs côte-à-côte", "hu": "Az y tengely méretének korlátozása, több grafikon összehasonlításakor lehet praktikus", "he": "הערך המקסימלי של ציר Y, כדי לשים כמה גרפים אחד ליד השני להשוואה באותו גובה" }, "default": { "en": "Automatically scaled to the data.", "fr": "Mise à l'échelle automatique des données", "hu": "Az adatoktól függő", "he": "לפי המידע בגרף" }, "example": "10000", "type": "number" }, "width": { "label": { "en": "Width", "fr": "Largeur", "hu": "Szélesség", "he": "רוחב" }, "description": { "en": "Width for the chart in pixels, if different from the default.", "fr": "Largeur du graph en pixels, si différent de la valeur par défaut", "hu": "A diagram szélessége képpontban", "he": "רוחב הגרף בפיקסלים, אם שונה מברירת מחדל" }, "type": "number", "default": "400" }, "height": { "label": { "en": "Height", "fr": "Hauteur", "hu": "Magasság", "he": "גובה" }, "description": { "en": "Height for the chart in pixels, if different from the default.", "fr": "Hauteur du graph en pixels, si différent de la valeur par défaut", "hu": "A grafikon magassága képpontban", "he": "גובה הגרף בפיקסלים, אם שונה מברירת מחדל" }, "type": "number", "default": "200" }, "platform": { "label": { "en": "Platform", "fr": "Plateforme", "hu": "Platform", "he": "פלטפורמה" }, "description": { "en": "Computer platform could be one of these: all-access (all platforms together), desktop (regular browsers), mobile-web (mobile browsers), mobile-app (mobile wiki applications)", "fr": "Type de la plateforme utilisée pour accéder au wiki : all-access (toutes les plateformes réunis), desktop (navigateur web standard), mobile-web (navigateur web sur mobile), mobile-app (application mobile)", "hu": "Platform, az alábbiak egyike: „all-access” (minden platform), „desktop” (asztali számítógépek böngészői), „mobile-web” (mobil eszközök böngészői) és „mobile-app” (mobil eszközökön futó Wikipédia-alkalmazások)", "he": "פלטפורמת מחשב, אחת מאלו: all-access (כולן ביחד), desktop (דפדפנים רגילים), mobile-web (דפדפנים בניידים), mobile-app (אפליקציות ויקי בניידים)" }, "type": "string", "default": "all-access" }, "granularity": { "label": { "en": "Granularity", "fr": "Granularité", "hu": "Részletesség", "he": "יחידות" }, "description": { "en": "If the 2nd parameter is '_' (shows site stats), set data granularity monthly, daily, or hourly", "fr": "Si le second paramètre est '_' (montrant les statistiques globales du wiki), définit la granularité des données : monthly (mensuel), daily (journalier), hourly (horaire)", "hu": "Ha a második paraméter „_” (teljes wiki statisztikái), az adatok pontossága: „monthly” (havi), „daily” (napi) vagy „hourly” (óránkénti)", "he": "אם הפרמטר השני הוא '_', ניתן לבחור בין daily ,monthly, או hourly" }, "type": "string", "default": "monthly" }, "interpolate": { "description": "Type of line interpolation. See https://github.com/vega/vega/wiki/Marks#line", "example": "linear, step-before, step-after, basis, basis-open, basis-closed, bundle, cardinal, cardinal-open, cardinal-closed, monotone", "type": "string", "default": "monotone" } }, "paramOrder": [ "1", "2", "3", "color", "scale", "max", "width", "height", "platform", "granularity", "interpolate" ], "format": "block", "description": { "en": "Inserts a graph with the page views statistics for the past N days of a page.", "fr": "Insère un graph représentant les statistiques de consultation d'une page pour les N derniers jours.", "hu": "Beilleszt egy grafikont egy lap utóbbi N napra vonatkozó nézettségi statisztikájával.", "he": "מציגה גרף צפיות לדף מסוים או לכל הדפים" } } </templatedata>