前言介紹
- 這款 WordPress 外掛「Plot Over Time – Extended」是 2014-08-01 上架。
- 目前有 10 個安裝啟用數。
- 上一次更新是 2014-08-06,距離現在已有 3925 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 3.0 以上版本才可以安裝。
- 有 1 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
外掛標籤
chart | graph | custom fields | weight tracking | google chart API |
內容簡介
我已經使用 Plot Over Time 外掛很長一段時間了,但發現當需要在同一頁面上放置多個圖表和分類限制時,這個外掛無法實現。然而我非常堅持不想使用新的外掛,因為這個外掛在過去一直運作正常... 所以,我進行了一些更改。
我的第一個更改對用戶很小,但執行起來需要耗費大量時間... 我添加了一個用於 chart_num 的可選參數。如果您在單個圖表頁面上使用該插件,則不需要此可選參數。只有在多圖表頁面上標識您要繪製的圖表時才需要使用它...
單個圖表頁面上:
[plot_ext field1="心率"]
多圖表頁面上:
[plot_ext field1="心率" chart_num="1"]
[plot_ext field1="血壓" chart_num="2"]
想看一下實際執行效果? 請參閱 http://www.ourroadtohealth.com/index.php/data-collection/total-blood-pressure/
我的第二個更改是添加了一個用於帖子類別限制的可選參數。如果您要從所有帖子類別中獲取數據,則不需要此可選參數。只有在您想要限制數據的某一個帖子類別時才需要使用它...
帶有類別選擇的單個圖表頁面:
[plot_ext field1="心率" post_cat="8"]
開始使用:
1. 首先,要讓它運作起來:您需要在您的帖子中放置數據。 因此,在帖子中,轉到帖子下的名為“Custom Fields”的部分。 創建您想要跟踪的字段(例如,“心率”),並給它一個值。
2. 在外掛執行之前,您至少需要兩篇帶有數據的帖子,因此請添加數據到另一篇帖子。
3. 現在您至少有兩篇帶有數據的帖子,可以創建一篇帖子,創建一個圖表。 對於此示例,您可以簡單地使用:
[plot_ext field1="心率"]
這將遍歷所有具有名為“心率”的自定義字段的帖子,並將它們繪製在漂亮的 Google Chart Tools LineChart 上。 Plot Over Time - Extended 最多支持每個圖表 10 個字段。如果您想要使用更多數據點(同樣最多 10 個),只需添加更多的自定義字段:
[plot_ext field1="心率" field2="重量" field3="鍛煉時間"]
圖例是自動添加的,每個數據點都可以單擊以獲取有關其數據點的說明。 或者,您可以使用 legend=”left” 或 legend=”right” 將圖例移動。如果您想要刪除圖例:
[plot_ext field1="心率" legend="none"]
類型:Plot Over Time 可以使用的有效圖表類型有:AreaChart、LineChart、PieChart(在此實現中不是特別有用)、BarChart 和 ColumnChart。 若要使用其他類型的圖表:
[plot_ext field1="心率" type="BarChart"]
高度/寬度:您可以使用 Width 和 Height 來設置圖表的寬度和高度(默認值:400 x 300)。不要使用 options=”height: “ 來更改高度或寬度,而應使用 height=”300” 或類似值。將其更改為傳遞給圖形的選項中不會更改其所在 DIV 的大小。
[plot_ext field1="心率" width="500" height="300"]
數據限制:默認情況下,Plot Over Time 使用所有帖子的所有數據並將其放入圖表中。您可以使用兩個選項來限制它:
1. 您可以使用 maxdays 确定最多通過多少天的數據(從現在開始往回計算)。這會顯示一個月的數據跨度:
[plot_ext field1="心率" maxdays="30"]
原文外掛簡介
I have used Plot Over Time for a long time when found that I needed to put multiple charts on one page and category restrictions. The plugin did not allow it. I am insistent on not needing a new plugin – as this one has worked just fine for me… So, I made changes.
My first change is small in user effort, but large in execution… I added an optional parameter for chart_num. This optional parameter is not needed if you are using the plugin for a single chart page. It is only needed to identify what chart you are making on a multi-chart page…
Single chart on a page…
[plot_ext field1="Heart Rate"]
Multi-Chart page…
[plot_ext field1="Heart Rate" chart_num="1"]
[plot_ext field1="Blood Pressure" chart_num="2"]
Want to see it in action? http://www.ourroadtohealth.com/index.php/data-collection/total-blood-pressure/
My second change… I added an optional parameter for post category restriction. This optional parameter is not needed if you are pulling from all post categories. It is only needed to identify what 1 post category you want to limit the data to…
Single chart on a page with category selection…
[plot_ext field1="Heart Rate" post_cat="8"]
Let’s Get Started:
1. To get it up and running: first, you’ll need to put data in your posts. So, in a post, go to the section under your post called “Custom Fields”. Create a field you want to track (for instance, “Heart Rate”) and give it a value.
2. You’ll need at lest two posts with data in them before the plugin can do it’s thing – so add data to another post.
3. Now that you have at least two posts with data, you can create a post that creates a graph. For this example, you could simply use:
[plot_ext field1="Heart Rate"]
This will go through all posts that have a custom field called “Heart Rate” and plot them on a nice Google Chart Tools LineChart. Plot Over Time – Extended supports up to 10 fields per graph. If you wanted to work with more points of data (again, up to 10), simply add more Custom Fields:
[plot_ext field1="Heart Rate" field2="Weight" field3="Workout Time"]
The legend is automatically added, and each datapoint is able to be clicked to get a callout about it’s datapoint. Or you can move the legend around with legend=”left” or legend=”right”. If you want to get rid of the legend:
[plot_ext field1="Heart Rate" legend="none"]
Types: Valid types chart types for Plot Over Time are: AreaChart, LineChart, PieChart (not particularly useful in this implementation), BarChart, and ColumnChart. To use other types of graphs:
[plot_ext field1="Heart Rate" type="BarChart"]
Height / Width: You can set your own width and height for the chart with Width and Height (default: 400 X 300). Don’t change the height or width using the options=”height: “, instead use height=”300” or similar. Changing it in the options that are passed to the graph won’t change the size of the div it exists in.
[plot_ext field1="Heart Rate" width="500" height="300"]
Data Limits: By default, Plot Over Time uses ALL data from all posts and pops it onto a graph. You can limit it with two options:
1. You can determine the maximum number of days worth of data (starting from now and going backward) with maxdays. This would show a one month span of data:
[plot_ext field1="Heart Rate" maxdays="30"]
2. You can attach a graph to that post’s published date with usepostdate:
[plot_ext field1="Heart Rate" usepostdate="true"]
So if the post was 3 weeks old, it would only show data from it’s publication date of three weeks ago and older – this allows you to see changes post by post!
Dates: The date format defaults to m/d/y – IE, 12/31/11. You can change it with dateformat. This would instead put 2011-12-31 on the graph:
[plot_ext field1="Heart Rate" dateformat="Y-m-d"]
Titles: This would add a title above your graph that reads “My Graph!”.
[plot_ext field1="Heart Rate" options="'title': 'My Graph!'" chart_num="1"]
Wrapping Up: Don’t like the colors of the graph, or want to add a few new options? No problem – any Google Visualization Tools options is available using the option parameters.
More Info: For more information on the options available visit the Google Chart Tools homepage: http://code.google.com/apis/chart/index.html
Rules:
1. If you define 5 fields you want to read from, and a post only had four fields? It’s going to ignore you.
2. It doesn’t do data interpolation. If there’s a gap in your data, it simply ignores it – it doesn’t give it a “0”, it just plain doesn’t plot it. (That’s how he wanted it. Other opinions may differ – mine does not.)
3. f you tell it you want to see 30 days of data, and you’ve only got three days of data in your posts? It’s only going to show a graph that spans three days.
All data integrity is up to you.
If you download, please rate the plugin. This is one of the few feedback methods available. If you have a low opinion, please allow me to try to fix it first before leaving a bad review.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Plot Over Time – Extended」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
延伸相關外掛(你可能也想知道)
Simple Graph 》這個外掛可以畫出有關日期的單一數據集的圖表。使用者可以將圖表公開放在側邊欄小工具或靜態頁面上,並且可以透過儀表板對數據進行操作。很多人使用這個外掛...。
Plot Over Time 》我在尋找一種炫酷的方式來建立健身日誌的圖表時發現了Tom Fotherby的Fotherplot。 作為那種不能忍受不改變任何事情的人,我必須對它進行一些修改......將它升...。
Google Equation for WordPress 》這個外掛可以讓你在文章中使用 LaTeX 加入數學公式。, 本外掛使用 Google 圖表 API,將 LaTeX 指令轉換成數學公式圖片。, 圖片將會存儲在你的網站上,因此效...。
Fotherplot 》透過學習如何使用 Google 圖表 API 繪製基於時間的資料之後,我創建了一個 WordPress 外掛,可以將存儲在自訂欄位中的數值與使用該欄位的 WordPress 網誌文章...。