內容簡介
GraphViz 是一個強大的工具,用於可視化連接物件的網絡和樹結構。
這個 WordPress 外掛提供了一個短碼機制,讓您可以在博客中創建 GraphViz 圖形,使用短碼機制。
它的工作基於 Mike Daines 提供的 viz.js 代碼:
https://github.com/mdaines/viz.js
特別感謝 TFO Graphviz 的作者 chrisy,例如為此自述文件提供了靈感:
如何使用 WP GraphViz
短碼語法為:
[wp_graphviz <options>]
<DOT 代碼>
[/wp_graphviz]
其中<options>是以下清單中的任意一個。所有選項都是完全可選的:
id="<id>"
提供用於將生成的圖像與圖像映射連接的標識符。如果您使用 simple 選項,則它還提供了生成的 DOT 圖形容器的名稱(因為 GraphViz 使用此來生成圖像映射)。如果未給出,則使用類似 wp_graphviz_N 的形式生成一個標識符,其中 N 是當加載插件時從一開始的整數,並隨著使用而增加。
output="<png|gif|jpg|svg>"
指示所需的圖像格式。默認為 png。
simple="yes|no"
simple 選項提供了非常基本的 DOT 包裝器以將代碼應用於以下目的:
[wp_graphviz simple="yes"] a -> b -> c; [/wp_graphviz]
生成的代碼將如下所示:
digraph wp_graphviz_1 {
a -> b -> c;
}
有關 digraph 名稱的說明,請參見 id 選項。 simple 默認為 no。
title="<title>"
指定圖像的標題。在圖像參考的 alt 和 title 屬性中使用。默認為空字符串。請注意,圖像映射可能指明一個 title 字符串,這將出現在工具提示中。
外掛標籤
開發者團隊
原文外掛簡介
GraphViz is a powerful tool for visualising network and tree structures that connect objects.
This WordPress plugin provides a shortcode mechanism to create GraphViz graphics within blogs, using the shortcode mechanism.
It’s working is based on the viz.js code as provided by Mike Daines:
https://github.com/mdaines/viz.js
Special thanks goes to chrisy as author of TFO Graphviz, e.g. for providing the inspiration for this readme:
How to use WP GraphViz
The shortcode syntax is:
[wp_graphviz
[/wp_graphviz]
Where
id="
Provides the identifier used to link the generated image to an image map. If you use the simple option then it also provides the name of the generated DOT graph container (since GraphViz uses this to generate the image map). If not given then an identifier is generated with the form wp_graphviz_N where N is an integer that starts at one when the plugin is loaded and is incremented with use.
output="
Indicates the desired image format. Defaults to png.
simple="yes|no"
The simple option provides a very basic DOT wrapper around your code such that the following is possible:
[wp_graphviz simple="yes"] a -> b -> c; [/wp_graphviz]
The generated code would look like:
digraph wp_graphviz_1 {
a -> b -> c;
}
See the id option for a description of where the name of the digraph comes from. simple defaults to no.
title="
Indicates the title of the image. This is used in the alt and title attributes of the image reference. This defaults to an empty string. Note that image maps may indicate a title string which will appear in tool-tips.
