內容簡介
這個外掛可以畫出有關日期的單一數據集的圖表。使用者可以將圖表公開放在側邊欄小工具或靜態頁面上,並且可以透過儀表板對數據進行操作。很多人使用這個外掛來追蹤他們部落格上的體重變化(包括我自己),但它也被用於其他許多用途。唯一的限制是水平軸必須顯示日期,而垂直軸可以顯示任何數值。每個使用者可以擁有自己的圖表,並且可以輕鬆地將它們插入文章和頁面中。
內容篩選器
如果你想在文章或頁面中插入圖表,只需在文章或頁面中編寫類似以下的字串。
[[simple-graph n=1 x=0 y=0 trend=0 wkly=0 lm=0 ytd=0 uid=0 gid=0 ]]
只需要按照你的需求替換這些值。上面的數字是預設值,如果你不需要更改預設值,可以直接省略。例如,[[simple-graph]] 只會從小工具設定中獲取預設值進行繪製。
n 是小工具選項的數量,預設選項(例如顏色)會從中獲取
x 是寬度,可以是任何正數值
y 是高度,可以是任何正數值
trend 是否顯示趨勢圖,0 = 不顯示,1 = 顯示
wkly 是否顯示週平均值,0 = 不顯示,1 = 顯示
lm 是否只顯示上個月的數值,0 = 否,1 = 是
ytd 是否只顯示去年的數值,0 = 否,1 = 是
uid 是圖表擁有者的使用者 ID(參見 WordPress 儀表板 -> 用戶)
gid 是使用者特定的圖表編號,與小工具控制面板中的圖表 # 選項相同
外掛標籤
開發者團隊
原文外掛簡介
Draws a graph of single set of date related data. Graph can be made public (i.e. sidebar widget or static page) and the data can be manipulated through dashboard. Many people use this plugin for weight tracking on their blogs (as do I), but it has been used for many other things as well. Only requirement – or rather a constraint – is that the horizontal axis of the graph shows dates. The vertical axis can hold any values. Each user can have their own graphs, which can be easily inserted in posts and pages.
Content filter
If you want to insert a graph in posts and/or pages, simply write a string similar to following in your post or page.
[[simple-graph n=1 x=0 y=0 trend=0 wkly=0 lm=0 ytd=0 uid=0 gid=0 ]]
Just replace the values as you wish. The ones above are default values, and if you don’t need to change the default value, you can simply omit that value from the string. I.e. [[simple-graph]] alone produces the graph with default values drawn from widget setup.
n is number of widget options, from where default options (such as colours) are drawn
x is width, any positive value is acceptable
y is height, any positive value is acceptable
trend is whether trend graph is shown, 0 = no, 1 = yes
wkly is whether weekly averages are shown, 0 = no, 1 = yes
lm is whether only values from last month are shown, 0 = no, 1 = yes
ytd is whether only values from last year are shown, 0 = no, 1 = yes
uid is user ID of the graph owner (see WordPress dashboard -> Users)
gid is user-specific graph number, same as in widget control panel’s graph# selection
