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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user