mirror of
https://github.com/tabler/tabler.git
synced 2026-07-28 14:04:38 +04:00
charts, colors fixes, charts demo
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<div class="navbar-search d-none d-lg-block">
|
||||
<div class="navbar-search d-none d-xl-block">
|
||||
<form action="." method="get">
|
||||
{% include ui/form/input-icon.html prepend=true light=true %}
|
||||
</form>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<header class="topnav topbar">
|
||||
<div class="navbar navbar-expand-lg {% if include.dark %}navbar-dark{% else %}navbar-light{% endif %}">
|
||||
<div class="container{% if include.fluid %}-fluid{% endif %}">
|
||||
{% include layout/menu.html top=true %}
|
||||
<div class="navbar navbar-expand-lg {% if include.dark %}navbar-dark{% else %}navbar-light{% endif %}">
|
||||
<div class="container{% if include.fluid %}-fluid{% endif %}">
|
||||
{% include layout/menu.html top=true %}
|
||||
|
||||
{% include_cached layout/navbar-search.html %}
|
||||
</div>
|
||||
</div>
|
||||
{% include_cached layout/navbar-search.html %}
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
window.ApexCharts && ({% if jekyll.environment == 'development' %}window.tabler_chart["chart-{{ include.chart-id }}"] = {% endif %}new ApexCharts(document.getElementById('chart-{{ id }}'), {
|
||||
chart: {
|
||||
type: "{{ data.type }}",
|
||||
type: "{{ data.type | default: 'bar' }}",
|
||||
{% if data.title or data.type == "bar" or data.type == "line" %}
|
||||
fontFamily: 'inherit',
|
||||
{% endif %}
|
||||
@@ -37,6 +37,7 @@
|
||||
enabled: true
|
||||
},
|
||||
{% else %}
|
||||
parentHeightOffset: 0,
|
||||
toolbar: {
|
||||
show: false,
|
||||
},
|
||||
@@ -129,18 +130,18 @@
|
||||
{% endif %}
|
||||
|
||||
{% if data.days-labels-count %}
|
||||
labels: [...Array({{ data.days-labels-count }}).keys()].map(n => `2019-09-${n + 1}`),
|
||||
labels: [...Array({{ data.days-labels-count }}).keys()].map(n => '2019-09-' + (n + 1)),
|
||||
{% endif %}
|
||||
|
||||
{% if data.series %}
|
||||
colors: [{% for serie in data.series %}{% assign color = serie.color | default: data.color | default: 'blue' %}"{{ color | tabler_color }}"{% unless forloop.last %}, {% endunless %}{% endfor %}],
|
||||
{% endif %}
|
||||
|
||||
{% if data.hide-legend %}
|
||||
{% unless data.show-legend %}
|
||||
legend: {
|
||||
show: false,
|
||||
},
|
||||
{% endif %}
|
||||
{% endunless %}
|
||||
|
||||
{% if data.hide-tooltip %}
|
||||
tooltip: {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
{% endif %}
|
||||
|
||||
{% append_lib peity %}
|
||||
<div class="sparkline{% if square %} sparkline-square{% endif %}{% if include.wide %} sparkline-wide{% endif %}" data-spark="{{ include.data }}" data-spark-type="{{ include.type }}" {% if include.color %}data-spark-color="{{ include.color | tabler_color }}" data-spark-color-bg="{{ include.color | tabler_color: '100' }}"{% endif %}>
|
||||
<div class="sparkline{% if square %} sparkline-square{% endif %}{% if include.wide %} sparkline-wide{% endif %}" data-spark="{{ include.data }}" data-spark-type="{{ include.type }}" {% if include.color %}data-spark-color="{{ include.color | default: 'blue' | tabler_color }}" data-spark-color-bg="{{ include.color | tabler_color: '100' }}"{% endif %}>
|
||||
{% if include.label %}
|
||||
<div class="sparkline-label">
|
||||
{{ include.label }}
|
||||
|
||||
Reference in New Issue
Block a user