1
0
mirror of https://github.com/tabler/tabler.git synced 2026-08-16 16:22:22 +04:00

small charts fixes

This commit is contained in:
chomik
2019-06-17 21:22:46 +02:00
parent a38f9dd391
commit 75a78b0187
3 changed files with 18 additions and 3 deletions
+10 -3
View File
@@ -5,11 +5,12 @@
<script>
$(document).ready(function(){
window.chart = window.chart || {};
window.ApexCharts && (window.chart["{{ include.chart-id }}"] = new ApexCharts(document.getElementById('{{ include.id }}'), {
var el;
window.ApexCharts && (window.chart["{{ include.chart-id }}"] = new ApexCharts((el = document.getElementById('{{ include.id }}')), {
chart: {
type: '{{ data.type }}',
height: document.getElementById('{{ include.id }}').offsetHeight,
height: el.offsetHeight,
{% if data.sparkline %}
sparkline: {
enabled: true
@@ -49,6 +50,12 @@ $(document).ready(function(){
{% endif %}
{% endif %}
{% if data.type == 'pie' or data.type == 'donut' %}
pie: {
height: el.offsetHeight
},
{% endif %}
{% if data.show-grid %}
grid: {
show: true,