SB Chart block

外掛說明

Use the Chart block ( oik-sb/chart ) to display a chart.

螢幕擷圖

  • Line chart - Gutenberg theme colors
  • Bar chart - Chart theme colors
  • Horizontal bar chart - Tertiary theme colors
  • Pie chart - Visualizer theme colors
  • Chart type toolbar selection

適用於區塊編輯器

這個外掛提供 1 個可供 Gutenberg/區塊編輯器使用的區塊。

  • Chart Displays a chart for CSV content.

安裝方式

  1. Upload the plugin files to the /wp-content/plugins/sb-chart-block directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the ‘Plugins’ screen in WordPress

OR with the authority to install plugins

  1. In the block editor, open the block inserter.
  2. Search for the block by typing ‘Chart’.
  3. Click on the ‘Add block’ button for the SB Chart block.
  4. The SB Chart block plugin will be installed and activated.
  5. And the block will be inserted into your content.

常見問題集

What types of chart can I display?

So far…

  • Line and stacked line, with optional fill
  • Bar and stacked bar
  • Horizontal bar and stacked horizontal bar
  • Pie

How do I choose the chart colors?

There are 6 predefined color palettes:
choose the color palette from a drop down list.

What options are there?

Options to control the chart display are:

  • Stacked – Toggle on to stack line or bar charts
  • Begin Y axis at 0 toggle
  • Fill toggle for line charts
  • Time line toggle for a date based axis, with selectable Time unit (stepSize)
  • Opacity – set the opacity of the background colours.
  • Height of the chart, in pixels
  • Bar thickness in pixels
  • Tension – for curved line charts

What Chart script does it use?

v1.1.0 delivers chartjs v3.9.1
and chartjs-adapter-date-fns v2.0.0

What do I need to search for to find the block?

Chart or SB Chart

What if my first language is not English?

If your first language is not English then you could try:

  • French – graphique
  • German – Diagramm
  • Dutch – grafiek
  • Italian – grafico
  • Spanish – gráfico

Do I need to build this block?

No. The plugin is delivered with the production version of the block.
If you do wish to modify the code then you can find instructions in the src folder.

使用者評論

這個外掛目前沒有任何使用者評論。

參與者及開發者

以下人員參與了開源軟體〈SB Chart block〉的開發相關工作。

參與者

將〈SB Chart block〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

1.1.0

  • Changed: Updated wp-scripts #13
  • Changed: Put Height and Bar thickness in separate panelbody tags #17
  • Changed: Update chart.js to v3.9.1 #11
  • Fixed: Fix Fatal on PHP 7.4 Remove default: #11
  • Tested: With WordPress 6.0.1 and WordPress Multi Site
  • Tested: With Gutenberg 13.8.2
  • Tested: With PHP 8.0