summaryrefslogtreecommitdiff
path: root/themes/blowfish/exampleSite/content/samples/charts
diff options
context:
space:
mode:
Diffstat (limited to 'themes/blowfish/exampleSite/content/samples/charts')
-rwxr-xr-xthemes/blowfish/exampleSite/content/samples/charts/index.it.md87
-rwxr-xr-xthemes/blowfish/exampleSite/content/samples/charts/index.ja.md87
-rwxr-xr-xthemes/blowfish/exampleSite/content/samples/charts/index.md87
-rwxr-xr-xthemes/blowfish/exampleSite/content/samples/charts/index.zh-cn.md87
4 files changed, 348 insertions, 0 deletions
diff --git a/themes/blowfish/exampleSite/content/samples/charts/index.it.md b/themes/blowfish/exampleSite/content/samples/charts/index.it.md
new file mode 100755
index 0000000..3d916f4
--- /dev/null
+++ b/themes/blowfish/exampleSite/content/samples/charts/index.it.md
@@ -0,0 +1,87 @@
+---
+title: "Charts"
+date: 2019-03-06
+description: "Guide to Chart.js usage in Blowfish"
+summary: "Blowfish includes Chart.js for powerful charts and data visualisations."
+tags: ["chart", "sample", "graph", "shortcodes"]
+showDate: false
+type: 'sample'
+---
+
+Blowfish includes support for Chart.js using the `chart` shortcode. Simply wrap the chart markup within the shortcode. Blowfish automatically themes charts to match the configured `colorScheme` parameter, however the colours can be customised using normal Chart.js syntax.
+
+Refer to the [chart shortcode]({{< ref "docs/shortcodes#chart" >}}) docs for more details.
+
+The examples below are a small selection taken from the [official Chart.js docs](https://www.chartjs.org/docs/latest/samples). You can also [view the page source](https://raw.githubusercontent.com/nunocoracao/blowfish/main/exampleSite/content/samples/charts/index.md) on GitHub to see the markup.
+
+## Bar chart
+
+<!-- prettier-ignore-start -->
+{{< chart >}}
+type: 'bar',
+data: {
+ labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
+ datasets: [{
+ label: 'My First Dataset',
+ data: [65, 59, 80, 81, 56, 55, 40],
+ backgroundColor: [
+ 'rgba(255, 99, 132, 0.2)',
+ 'rgba(255, 159, 64, 0.2)',
+ 'rgba(255, 205, 86, 0.2)',
+ 'rgba(75, 192, 192, 0.2)',
+ 'rgba(54, 162, 235, 0.2)',
+ 'rgba(153, 102, 255, 0.2)',
+ 'rgba(201, 203, 207, 0.2)'
+ ],
+ borderColor: [
+ 'rgb(255, 99, 132)',
+ 'rgb(255, 159, 64)',
+ 'rgb(255, 205, 86)',
+ 'rgb(75, 192, 192)',
+ 'rgb(54, 162, 235)',
+ 'rgb(153, 102, 255)',
+ 'rgb(201, 203, 207)'
+ ],
+ borderWidth: 1
+ }]
+}
+{{< /chart >}}
+<!-- prettier-ignore-end -->
+
+## Line chart
+
+<!-- prettier-ignore-start -->
+{{< chart >}}
+type: 'line',
+data: {
+ labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
+ datasets: [{
+ label: 'My First Dataset',
+ data: [65, 59, 80, 81, 56, 55, 40],
+ tension: 0.2
+ }]
+}
+{{< /chart >}}
+<!-- prettier-ignore-end -->
+
+## Doughnut chart
+
+<!-- prettier-ignore-start -->
+{{< chart >}}
+type: 'doughnut',
+data: {
+ labels: ['Red', 'Blue', 'Yellow'],
+ datasets: [{
+ label: 'My First Dataset',
+ data: [300, 50, 100],
+ backgroundColor: [
+ 'rgba(255, 99, 132, 0.7)',
+ 'rgba(54, 162, 235, 0.7)',
+ 'rgba(255, 205, 86, 0.7)'
+ ],
+ borderWidth: 0,
+ hoverOffset: 4
+ }]
+}
+{{< /chart >}}
+<!-- prettier-ignore-end -->
diff --git a/themes/blowfish/exampleSite/content/samples/charts/index.ja.md b/themes/blowfish/exampleSite/content/samples/charts/index.ja.md
new file mode 100755
index 0000000..ee9e8f1
--- /dev/null
+++ b/themes/blowfish/exampleSite/content/samples/charts/index.ja.md
@@ -0,0 +1,87 @@
+---
+title: "図表"
+date: 2019-03-06
+description: "Blowfish での Chart.js の利用方法のガイド"
+summary: "Blowfish は強力な図表とデータの視覚化のために Chart.js を内蔵しています。"
+tags: ["chart", "sample", "graph", "shortcodes"]
+showDate: false
+type: 'sample'
+---
+
+Blowfish は Chart.js の `chart` ショートコードを内蔵し、利用をサポートしています。ショートコードでグラフのマークアップを囲むだけです。 Blowfish は `colorScheme` パラメータで自動的にグラフのテーマが適応されますが、通常の Chart.js 構文を利用して色をカスタマイズすることも可能です。
+
+[グラフのショートコード]({{< ref "docs/shortcodes#chart" >}})資料で更に詳細を参照出来ます。
+
+以下は [Chart.js 公式資料](https://www.chartjs.org/docs/latest/samples)から抜粋した例です。 GitHub でマークアップを[ページソースで見る](https://raw.githubusercontent.com/nunocoracao/blowfish/main/exampleSite/content/samples/charts/index.md)ことができます。
+
+## 棒グラフ
+
+<!-- prettier-ignore-start -->
+{{< chart >}}
+type: 'bar',
+data: {
+ labels: ['1月', '2月', '3月', '4月', '5月', '6月', '7月'],
+ datasets: [{
+ label: '初めてのデータセット',
+ data: [65, 59, 80, 81, 56, 55, 40],
+ backgroundColor: [
+ 'rgba(255, 99, 132, 0.2)',
+ 'rgba(255, 159, 64, 0.2)',
+ 'rgba(255, 205, 86, 0.2)',
+ 'rgba(75, 192, 192, 0.2)',
+ 'rgba(54, 162, 235, 0.2)',
+ 'rgba(153, 102, 255, 0.2)',
+ 'rgba(201, 203, 207, 0.2)'
+ ],
+ borderColor: [
+ 'rgb(255, 99, 132)',
+ 'rgb(255, 159, 64)',
+ 'rgb(255, 205, 86)',
+ 'rgb(75, 192, 192)',
+ 'rgb(54, 162, 235)',
+ 'rgb(153, 102, 255)',
+ 'rgb(201, 203, 207)'
+ ],
+ borderWidth: 1
+ }]
+}
+{{< /chart >}}
+<!-- prettier-ignore-end -->
+
+## 折れ線グラフ
+
+<!-- prettier-ignore-start -->
+{{< chart >}}
+type: 'line',
+data: {
+ labels: ['1月', '2月', '3月', '4月', '5月', '6月', '7月'],
+ datasets: [{
+ label: '初めてのデータセット',
+ data: [65, 59, 80, 81, 56, 55, 40],
+ tension: 0.2
+ }]
+}
+{{< /chart >}}
+<!-- prettier-ignore-end -->
+
+## 円グラフ
+
+<!-- prettier-ignore-start -->
+{{< chart >}}
+type: 'doughnut',
+data: {
+ labels: ['赤色', '青色', '黄色'],
+ datasets: [{
+ label: '初めてのデータセット',
+ data: [300, 50, 100],
+ backgroundColor: [
+ 'rgba(255, 99, 132, 0.7)',
+ 'rgba(54, 162, 235, 0.7)',
+ 'rgba(255, 205, 86, 0.7)'
+ ],
+ borderWidth: 0,
+ hoverOffset: 4
+ }]
+}
+{{< /chart >}}
+<!-- prettier-ignore-end -->
diff --git a/themes/blowfish/exampleSite/content/samples/charts/index.md b/themes/blowfish/exampleSite/content/samples/charts/index.md
new file mode 100755
index 0000000..3d916f4
--- /dev/null
+++ b/themes/blowfish/exampleSite/content/samples/charts/index.md
@@ -0,0 +1,87 @@
+---
+title: "Charts"
+date: 2019-03-06
+description: "Guide to Chart.js usage in Blowfish"
+summary: "Blowfish includes Chart.js for powerful charts and data visualisations."
+tags: ["chart", "sample", "graph", "shortcodes"]
+showDate: false
+type: 'sample'
+---
+
+Blowfish includes support for Chart.js using the `chart` shortcode. Simply wrap the chart markup within the shortcode. Blowfish automatically themes charts to match the configured `colorScheme` parameter, however the colours can be customised using normal Chart.js syntax.
+
+Refer to the [chart shortcode]({{< ref "docs/shortcodes#chart" >}}) docs for more details.
+
+The examples below are a small selection taken from the [official Chart.js docs](https://www.chartjs.org/docs/latest/samples). You can also [view the page source](https://raw.githubusercontent.com/nunocoracao/blowfish/main/exampleSite/content/samples/charts/index.md) on GitHub to see the markup.
+
+## Bar chart
+
+<!-- prettier-ignore-start -->
+{{< chart >}}
+type: 'bar',
+data: {
+ labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
+ datasets: [{
+ label: 'My First Dataset',
+ data: [65, 59, 80, 81, 56, 55, 40],
+ backgroundColor: [
+ 'rgba(255, 99, 132, 0.2)',
+ 'rgba(255, 159, 64, 0.2)',
+ 'rgba(255, 205, 86, 0.2)',
+ 'rgba(75, 192, 192, 0.2)',
+ 'rgba(54, 162, 235, 0.2)',
+ 'rgba(153, 102, 255, 0.2)',
+ 'rgba(201, 203, 207, 0.2)'
+ ],
+ borderColor: [
+ 'rgb(255, 99, 132)',
+ 'rgb(255, 159, 64)',
+ 'rgb(255, 205, 86)',
+ 'rgb(75, 192, 192)',
+ 'rgb(54, 162, 235)',
+ 'rgb(153, 102, 255)',
+ 'rgb(201, 203, 207)'
+ ],
+ borderWidth: 1
+ }]
+}
+{{< /chart >}}
+<!-- prettier-ignore-end -->
+
+## Line chart
+
+<!-- prettier-ignore-start -->
+{{< chart >}}
+type: 'line',
+data: {
+ labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
+ datasets: [{
+ label: 'My First Dataset',
+ data: [65, 59, 80, 81, 56, 55, 40],
+ tension: 0.2
+ }]
+}
+{{< /chart >}}
+<!-- prettier-ignore-end -->
+
+## Doughnut chart
+
+<!-- prettier-ignore-start -->
+{{< chart >}}
+type: 'doughnut',
+data: {
+ labels: ['Red', 'Blue', 'Yellow'],
+ datasets: [{
+ label: 'My First Dataset',
+ data: [300, 50, 100],
+ backgroundColor: [
+ 'rgba(255, 99, 132, 0.7)',
+ 'rgba(54, 162, 235, 0.7)',
+ 'rgba(255, 205, 86, 0.7)'
+ ],
+ borderWidth: 0,
+ hoverOffset: 4
+ }]
+}
+{{< /chart >}}
+<!-- prettier-ignore-end -->
diff --git a/themes/blowfish/exampleSite/content/samples/charts/index.zh-cn.md b/themes/blowfish/exampleSite/content/samples/charts/index.zh-cn.md
new file mode 100755
index 0000000..0e2ca29
--- /dev/null
+++ b/themes/blowfish/exampleSite/content/samples/charts/index.zh-cn.md
@@ -0,0 +1,87 @@
+---
+title: "图表"
+date: 2019-03-06
+description: "在Blowfish 中使用 Chart.js 指南"
+summary: "Blowfish 包含 Chart.js,可实现强大的图表和数据可视化。"
+tags: ["表格", "示例", "图片", "简码"]
+showDate: false
+type: 'sample'
+---
+
+Blowfish 使用 `chart` 简码来调用 Chart.js。Blowfish 会自动为图表设置主题以匹配配置的 `colorScheme` 参数,但是可以使用 Chart.js 语法来自定义图表颜色。
+
+有关更多详细信息,请参阅 [图表简码]({{< ref "docs/shortcodes#chart" >}}) 文档。
+
+下面的示例是从 [Chart.js 官方文档](https://www.chartjs.org/docs/latest/samples) 中选取的一小部分。您还可以在 GitHub 上[查看页面源代码](https://raw.githubusercontent.com/nunocoracao/blowfish/main/exampleSite/content/samples/charts/index.md) 查看书写方式。
+
+## 柱形图
+
+<!-- prettier-ignore-start -->
+{{< chart >}}
+type: 'bar',
+data: {
+ labels: ['一月', '二月', '三月', '四月', '五月', '六月', '七月'],
+ datasets: [{
+ label: '我的第一组数据',
+ data: [65, 59, 80, 81, 56, 55, 40],
+ backgroundColor: [
+ 'rgba(255, 99, 132, 0.2)',
+ 'rgba(255, 159, 64, 0.2)',
+ 'rgba(255, 205, 86, 0.2)',
+ 'rgba(75, 192, 192, 0.2)',
+ 'rgba(54, 162, 235, 0.2)',
+ 'rgba(153, 102, 255, 0.2)',
+ 'rgba(201, 203, 207, 0.2)'
+ ],
+ borderColor: [
+ 'rgb(255, 99, 132)',
+ 'rgb(255, 159, 64)',
+ 'rgb(255, 205, 86)',
+ 'rgb(75, 192, 192)',
+ 'rgb(54, 162, 235)',
+ 'rgb(153, 102, 255)',
+ 'rgb(201, 203, 207)'
+ ],
+ borderWidth: 1
+ }]
+}
+{{< /chart >}}
+<!-- prettier-ignore-end -->
+
+## 折线图
+
+<!-- prettier-ignore-start -->
+{{< chart >}}
+type: 'line',
+data: {
+ labels: ['一月', '二月', '三月', '四月', '五月', '六月', '七月'],
+ datasets: [{
+ label: '我的第一组数据',
+ data: [65, 59, 80, 81, 56, 55, 40],
+ tension: 0.2
+ }]
+}
+{{< /chart >}}
+<!-- prettier-ignore-end -->
+
+## 扇形图
+
+<!-- prettier-ignore-start -->
+{{< chart >}}
+type: 'doughnut',
+data: {
+ labels: ['红', '蓝', '黄'],
+ datasets: [{
+ label: '我的第一组数据',
+ data: [300, 50, 100],
+ backgroundColor: [
+ 'rgba(255, 99, 132, 0.7)',
+ 'rgba(54, 162, 235, 0.7)',
+ 'rgba(255, 205, 86, 0.7)'
+ ],
+ borderWidth: 0,
+ hoverOffset: 4
+ }]
+}
+{{< /chart >}}
+<!-- prettier-ignore-end -->