mirror of
https://github.com/tabler/tabler.git
synced 2025-12-21 17:34:25 +04:00
editorconfig fixes, charts demo
This commit is contained in:
@@ -10,8 +10,8 @@ indent_style=tab
|
|||||||
tab_width=3
|
tab_width=3
|
||||||
|
|
||||||
[*.html]
|
[*.html]
|
||||||
indent_style=space
|
|
||||||
indent_size=3
|
indent_size=3
|
||||||
|
insert_final_newline=false
|
||||||
|
|
||||||
[*.md]
|
[*.md]
|
||||||
indent_style=tab
|
indent_style=tab
|
||||||
@@ -20,12 +20,3 @@ tab_width=3
|
|||||||
[*.js.map]
|
[*.js.map]
|
||||||
indent_style=tab
|
indent_style=tab
|
||||||
indent_size=3
|
indent_size=3
|
||||||
|
|
||||||
[{*.css,*.scss}]
|
|
||||||
indent_style=space
|
|
||||||
indent_size=2
|
|
||||||
insert_final_newline = true
|
|
||||||
|
|
||||||
[{*.yml,*.yaml}]
|
|
||||||
indent_style=space
|
|
||||||
indent_size=2
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
total-sales:
|
total-sales:
|
||||||
type: donut
|
type: donut
|
||||||
|
demo: true
|
||||||
sparkline: true
|
sparkline: true
|
||||||
hide-legend: true
|
hide-legend: true
|
||||||
name: Total sales
|
name: Total sales
|
||||||
@@ -19,6 +20,7 @@ total-sales:
|
|||||||
|
|
||||||
campaigns:
|
campaigns:
|
||||||
name: Campaigns
|
name: Campaigns
|
||||||
|
demo: true
|
||||||
type: radialBar
|
type: radialBar
|
||||||
sparkline: true
|
sparkline: true
|
||||||
hide-legend: true
|
hide-legend: true
|
||||||
@@ -35,6 +37,7 @@ campaigns:
|
|||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
name: Tasks
|
name: Tasks
|
||||||
|
demo: true
|
||||||
type: line
|
type: line
|
||||||
categories: ['M', 'T', 'W', 'T', 'F', 'S', 'S', 'M', 'T', 'W', 'T', 'F', 'S', 'S', 'M', 'T', 'W']
|
categories: ['M', 'T', 'W', 'T', 'F', 'S', 'S', 'M', 'T', 'W', 'T', 'F', 'S', 'S', 'M', 'T', 'W']
|
||||||
groups: [1, 2, 3]
|
groups: [1, 2, 3]
|
||||||
@@ -71,7 +74,7 @@ development-activity:
|
|||||||
|
|
||||||
line:
|
line:
|
||||||
name: Employment Growth
|
name: Employment Growth
|
||||||
display: true
|
demo: true
|
||||||
type: line
|
type: line
|
||||||
show-grid: true
|
show-grid: true
|
||||||
categories: ['2013', '2014', '2015', '2016', '2017', '2018']
|
categories: ['2013', '2014', '2015', '2016', '2017', '2018']
|
||||||
@@ -88,7 +91,7 @@ line:
|
|||||||
|
|
||||||
line-stroke:
|
line-stroke:
|
||||||
name: Line chart
|
name: Line chart
|
||||||
display: true
|
demo: true
|
||||||
type: line
|
type: line
|
||||||
stroke-curve: straight
|
stroke-curve: straight
|
||||||
hide-legend: true
|
hide-legend: true
|
||||||
@@ -107,7 +110,7 @@ line-stroke:
|
|||||||
|
|
||||||
stepline:
|
stepline:
|
||||||
name: Stepline
|
name: Stepline
|
||||||
display: true
|
demo: true
|
||||||
type: line
|
type: line
|
||||||
hide-legend: true
|
hide-legend: true
|
||||||
stroke-curve: stepline
|
stroke-curve: stepline
|
||||||
@@ -119,7 +122,7 @@ stepline:
|
|||||||
|
|
||||||
temperature:
|
temperature:
|
||||||
name: Monthly Average Temperature
|
name: Monthly Average Temperature
|
||||||
display: true
|
demo: true
|
||||||
type: line
|
type: line
|
||||||
show-labels: true
|
show-labels: true
|
||||||
show-data-labels: true
|
show-data-labels: true
|
||||||
@@ -138,7 +141,7 @@ temperature:
|
|||||||
|
|
||||||
area:
|
area:
|
||||||
name: Lorem ipsum
|
name: Lorem ipsum
|
||||||
display: true
|
demo: true
|
||||||
type: area
|
type: area
|
||||||
hide-legend: true
|
hide-legend: true
|
||||||
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun']
|
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun']
|
||||||
@@ -153,7 +156,7 @@ area:
|
|||||||
|
|
||||||
area-spline:
|
area-spline:
|
||||||
name: Lorem ipsum
|
name: Lorem ipsum
|
||||||
display: true
|
demo: true
|
||||||
type: area
|
type: area
|
||||||
spline: true
|
spline: true
|
||||||
hide-legend: true
|
hide-legend: true
|
||||||
@@ -169,7 +172,7 @@ area-spline:
|
|||||||
|
|
||||||
area-spline-stacked:
|
area-spline-stacked:
|
||||||
name: Lorem ipsum
|
name: Lorem ipsum
|
||||||
display: true
|
demo: true
|
||||||
type: area
|
type: area
|
||||||
spline: true
|
spline: true
|
||||||
hide-legend: true
|
hide-legend: true
|
||||||
@@ -186,7 +189,7 @@ area-spline-stacked:
|
|||||||
|
|
||||||
spline:
|
spline:
|
||||||
name: Wind speed during two days
|
name: Wind speed during two days
|
||||||
display: true
|
demo: true
|
||||||
type: line
|
type: line
|
||||||
spline: true
|
spline: true
|
||||||
show-labels: true
|
show-labels: true
|
||||||
@@ -203,7 +206,7 @@ spline:
|
|||||||
|
|
||||||
spline-rotated:
|
spline-rotated:
|
||||||
name: Lorem ipsum
|
name: Lorem ipsum
|
||||||
display: true
|
demo: true
|
||||||
type: line
|
type: line
|
||||||
spline: true
|
spline: true
|
||||||
rotated: true
|
rotated: true
|
||||||
@@ -220,7 +223,7 @@ spline-rotated:
|
|||||||
|
|
||||||
bar:
|
bar:
|
||||||
name: Lorem ipsum
|
name: Lorem ipsum
|
||||||
display: true
|
demo: true
|
||||||
type: bar
|
type: bar
|
||||||
hide-legend: true
|
hide-legend: true
|
||||||
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun']
|
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun']
|
||||||
@@ -234,7 +237,7 @@ bar:
|
|||||||
|
|
||||||
bar-rotated:
|
bar-rotated:
|
||||||
name: Lorem ipsum
|
name: Lorem ipsum
|
||||||
display: true
|
demo: true
|
||||||
type: bar
|
type: bar
|
||||||
rotated: true
|
rotated: true
|
||||||
hide-legend: true
|
hide-legend: true
|
||||||
@@ -250,7 +253,7 @@ bar-rotated:
|
|||||||
|
|
||||||
bar-stacked:
|
bar-stacked:
|
||||||
name: Lorem ipsum
|
name: Lorem ipsum
|
||||||
display: true
|
demo: true
|
||||||
type: bar
|
type: bar
|
||||||
stacked: true
|
stacked: true
|
||||||
hide-legend: true
|
hide-legend: true
|
||||||
@@ -266,7 +269,7 @@ bar-stacked:
|
|||||||
|
|
||||||
pie:
|
pie:
|
||||||
name: Lorem ipsum
|
name: Lorem ipsum
|
||||||
display: true
|
demo: true
|
||||||
type: pie
|
type: pie
|
||||||
hide-legend: true
|
hide-legend: true
|
||||||
show-data-labels: true
|
show-data-labels: true
|
||||||
@@ -287,7 +290,7 @@ pie:
|
|||||||
|
|
||||||
donut:
|
donut:
|
||||||
name: Lorem ipsum
|
name: Lorem ipsum
|
||||||
display: true
|
demo: true
|
||||||
type: donut
|
type: donut
|
||||||
sparkline: true
|
sparkline: true
|
||||||
hide-legend: true
|
hide-legend: true
|
||||||
@@ -302,7 +305,7 @@ donut:
|
|||||||
|
|
||||||
scatter:
|
scatter:
|
||||||
name: Lorem ipsum
|
name: Lorem ipsum
|
||||||
display: true
|
demo: true
|
||||||
type: scatter
|
type: scatter
|
||||||
hide-legend: true
|
hide-legend: true
|
||||||
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun']
|
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun']
|
||||||
@@ -317,7 +320,7 @@ scatter:
|
|||||||
|
|
||||||
combination:
|
combination:
|
||||||
name: Combination chart
|
name: Combination chart
|
||||||
display: true
|
demo: true
|
||||||
type: bar
|
type: bar
|
||||||
types:
|
types:
|
||||||
2: 'line'
|
2: 'line'
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
{% assign data = site.data.charts[include.chart-id] %}
|
|
||||||
{% assign height = include.height | default: 10 %}
|
|
||||||
<div class="card">
|
|
||||||
<div class="card-body">
|
|
||||||
{% if include.title %}
|
|
||||||
<h3 class="card-title">{{ include.title }}</h3>
|
|
||||||
{% endif %}
|
|
||||||
{% include ui/chart.html height=height chart-id=include.chart-id %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@@ -43,10 +43,10 @@
|
|||||||
<div class="col-lg-6">
|
<div class="col-lg-6">
|
||||||
<div class="row row-deck">
|
<div class="row row-deck">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
{% include cards/charts/card.html chart-id="temperature" height=10 %}
|
{% comment %}{% include cards/charts/card.html chart-id="temperature" height=10 %}{% endcomment %}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
{% include cards/charts/card.html chart-id="donut" height=10 %}
|
{% comment %}{% include cards/charts/card.html chart-id="donut" height=10 %}{% endcomment %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -105,10 +105,10 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if data.series %}
|
{% if data.series %}
|
||||||
colors: [ //chart colors
|
colors: [
|
||||||
{% for serie in data.series %}
|
{% for serie in data.series %}
|
||||||
{{ serie.color | default: 'blue' | tabler_js_color }}{% unless forloop.last %},{% endunless %}{% endfor %}
|
{{ serie.color | default: 'blue' | tabler_js_color }}{% unless forloop.last %},{% endunless %}{% endfor %}
|
||||||
],
|
],
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if data.hide-legend %}
|
{% if data.hide-legend %}
|
||||||
|
|||||||
@@ -1,16 +1,25 @@
|
|||||||
---
|
---
|
||||||
title: Charts
|
title: Charts
|
||||||
|
page-title: Charts
|
||||||
menu: charts
|
menu: charts
|
||||||
---
|
---
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
{% for chart in site.data.charts %}
|
{% for chart in site.data.charts %}
|
||||||
{% if chart[1].display %}
|
{% if chart[1].demo %}
|
||||||
{% assign chart-name = chart[0] %}
|
{% assign chart-id = chart[0] %}
|
||||||
<div class="col-lg-6 col-xl-4">
|
<div class="col-lg-6 col-xl-4">
|
||||||
{% include cards/charts/card.html chart-id=chart-name %}
|
<div class="card">
|
||||||
|
{% if chart[1].name %}
|
||||||
|
<div class="card-header">
|
||||||
|
<h3 class="card-title">{{ chart[1].name }}</h3>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
<div class="card-body">
|
||||||
|
{% include ui/chart.html chart-id=chart-id height=15 %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user