[WordPress] 外掛分享: Easy Graphs

首頁外掛目錄 › Easy Graphs
10+
安裝啟用
☆☆☆☆
1/5 分(1 則評價)
5016 天前
最後更新
問題解決
WordPress 3.3+ v1.0 上架:2012-06-20

內容簡介

大家都喜歡數據視覺化,因此我創建了一個外掛程式,讓製作餅圖、柱狀圖和折線圖變得簡單、快速和安全。這個外掛的名字是:Easy Graphs。

使用 Easy Graphs 非常簡單,只需使用一個短代碼 – [easy_graphs]

但不僅如此,該短代碼還需要一個參數 “data”。這個參數是一個由數字組成、以逗號隔開的清單,例如:“1,2,3,4,5,6,7”。

您還可以添加一個 “type” 參數。“type” 參數可以是 “line”、“bar” 或 “pie”。其中 “bar” 是預設值。

對於柱狀圖,您還可以加入進一步的參數:寬度、高度和顏色。

例如:[easy_graphs height=”200″ type=”bar” data=”30,70,65″]

預設情況下,寬度和高度將從 WordPress 中的「設定 > 媒體」菜單中設置的視訊嵌入大小中取得。顏色應該是十六進制碼。

對於折線圖,選項類似:color1、color2、height 和 width。

如果您這樣做:[easy_graphs height=”200″ type=”line” data=”200,150,175,260″]

在這種情況下,color1 是「填充」顏色,而 color2 是「線條」顏色。兩者都應該是十六進制。

對於餅圖,有一些額外的限制,但參數較少:color1、color2 和 diameter。

請嘗試:[easy_graphs diameter=”150″ data=”40,60″ type=”pie”]

diameter 必須是以像素表示的整數。color1 和 color2 是餅圖切片的填充顏色。限制是餅圖目前只能包含 2 個數據值。我會繼續努力改進。

未來的更新路線圖上有其他事情。例如:讓餅圖包含多於兩個數據值,或者加入其他圖表類型,或者增加標籤,以便數據更易於理解。

您會添加些什麼內容?

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Easy Graphs」→ 直接安裝(推薦)

原文外掛簡介

Everyone likes data visualizations so I wrote a plugin that will make the quick and secure creation of Pie Charts, Bar Charts and Line Charts easy. The answer is: Easy Graphs.
Easy graphs is very simple to use. It’s a shortcode – [easy_graphs]
Not just like that. The shortcode also requires one parameter “data”. This parameter is a comma separated list of number values “1,2,3,4,5,6,7”.
You can also add a “type” parameter. The “type” can be “line”, “bar” or “pie”. “bar” is the default.
For a Bar graph, you can optionally pass additional parameters: width, height, and color.
Example: [easy_graphs height=”200″ type=”bar” data=”30,70,65″]
By default, width and height are populated from your media embed sizes that are set in your Settings > Media menu inside WordPress. Color should be a hex color code.
For a line graph, the options are similar: color1, color2, height and width.
If you will: [easy_graphs height=”200″ type=”line” data=”200,150,175,260″]
In this case, color1 is the “fill” color and color2 is the line color. Both should be hex.
For Pie charts, there are some additional limitations but fewer parameters: color1, color2 and diameter.
Try this: [easy_graphs diameter=”150″ data=”40,60″ type=”pie”]
Diameter should be an integer represented in pixels. Color1 and color2 are the fill colors of the pie slices. The limitation is the pie chart, at this time, can only take 2 values. I’ll work on that.
On the roadmap are other things. Make the pie chart take more values than just 2. Maybe include other graph types. Labels so the data can be more easily understood.
What would you add to this?

延伸相關外掛

文章
Filter
Apply Filters
Mastodon