// 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/mobinwiki.ir/all-access/user/%D8%A7%D9%84%DA%AF%D9%88%3A%D8%A8%D8%A7%D8%B2%D8%AF%DB%8C%D8%AF%20%D8%B3%D8%A7%D9%84%D8%A7%D9%86%D9%87/daily/2025120600/2026120600",
"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,
این الگو در تعداد زیادی صفحه صفحه بهکار رفته است و تغییر دادن آن میتواند تأثیرات گستردهای داشتهباشد. لطفاً تغییرات را در زیرصفحههای /تمرین یا /آزمایشی الگو، یا در زیرصفحهٔ کاربری خودتان بیازمایید. توصیه میشود که ابتدا در خصوص تغییرات مورد نظر در صفحهٔ بحث گفتگو کرده و سپس آنها را پیادهسازی کنید.
این الگو، بازدیدهای روزانهٔ مقاله در یک بازهٔ زمانی (پیشفرض: یک سال گذشته) را تهیه میکند و این آمار را در یک کادر مناسب بههمراه یک عنوان نمایش میدهد. این الگو معمولاً در صفحهٔ بحث مقالهها و در زیر سایر الگوهای سرآیند صفحهٔ بحث قرار داده میشود.
|گسترده= میتواند برای جلوگیری از بسته شدن خودکار جعبهٔ پیام مورد استفاده قرار گیرد. برای جلوگیری از بسته شدن نمودار در زمان بارگیری صفحه، از |گسترده=بله استفاده کنید.
|روزها= (پیشفرض: ۳۶۵) میتواند برای تغییر تعداد روزهای نمایشیافته در نمودار بازدیدها به کار رود.
|هدف= (پیشفرض: {{نامصفحهموضوع}}) میتواند برای تعیین همزمان نام صفحهٔ نمایشیافته در عنوان نمودار (در صورت وارد نشدن |عنوان=) و صفحهای که آمار آن در نمودار نمایش مییابد، به کار رود.
|عنوان= (پیشفرض: بدون یادداشت) میتواند برای تعیین صفحهٔ مندرج در عنوان نمودار به کار رود.
|رنگ= (پیشفرض: #00f) میتواند برای تغییر رنگ نمودار بهکار رود؛ ورودیهای معتبر برای این پارامتر شمال رنگهای وب (برای مثال «red») و کدهای هگز هستند.
|مقیاس= (پیشفرض: linear) میتواند برای تغییر مقیاس محور عمودی نمودار به کار رود؛ ورودیهای معتبر: linear، log، pow، sqrt، quantile، quantize و threshold.
|عرض= (پیشفرض: ۵۷۰) میتواند برای تغییر عرض تصویر به پیکسل به کار رود.
نکته: اندازهٔ پیشفرض ۵۷۰ پیکسل برای همسانسازی اندازهٔ جعبه با سایر الگوهای جعبهای صفحهٔ بحث تنظیم شدهاست؛ مقدارهای خارج از بازهٔ ۴۰۰–۹۸۰ ممکن است مشکلساز باشند.
|ارتفاع= (پیشفرض: ۲۰۰) میتواند برای تعیین ارتفاع جعبهٔ نمودار به کار رود.
نکاتی پرامون عنوان نمودار
اگر هرچیک از پارامترهای |عنوان= و |هدف=وارد نشده باشند، عنوان نمودار بسته به فضای نام صفحهای که الگو در آن قرار گرفته، متغیر خواهد بود.
عنوان نمودار در صورتی که الگو در صفحهٔ بحث یک مقاله قرار گیرد:
اگر |عنوان=وارد نشده باشد، اما |هدف=وارد شده باشد، عنوان نمودار روی «بازدیدهای روزانهٔ صفحهٔ هدف» تنظیم میشود و عنوان صفحهٔ هدف نیز پیوند داده میشود.
برای مثال، وارد کردن |هدف=فلان عنوان نمودار را به شکل زیر تنظیم میکند:
// 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/mobinwiki.ir/all-access/user/%D8%A7%D9%84%DA%AF%D9%88%3A%D8%A8%D8%A7%D8%B2%D8%AF%DB%8C%D8%AF%20%D8%B3%D8%A7%D9%84%D8%A7%D9%86%D9%87/daily/2025120600/2026120600",
"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,
// 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/mobinwiki.ir/all-access/user/%D8%A7%D9%84%DA%AF%D9%88%3A%D8%A8%D8%A7%D8%B2%D8%AF%DB%8C%D8%AF%20%D8%B3%D8%A7%D9%84%D8%A7%D9%86%D9%87/daily/2025120600/2026120600",
"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,
// 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/mobinwiki.ir/all-access/user/%D9%BE%D9%86%DA%A9%DB%8C%DA%A9/daily/2026070900/2026120600",
"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": "log",
"range": "height",
"domain": {"data": "pageviews","field": "views"},
"clamp": true,
// 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/mobinwiki.ir/all-access/user/%D9%BE%D9%86%DA%A9%DB%8C%DA%A9/daily/2026070900/2026120600",
"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,
// 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/mobinwiki.ir/all-access/user/%D8%A7%D9%85%DB%8C%D8%B1%20%D8%AA%D8%AA%D9%84%D9%88/daily/2026110600/2026120600",
"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,