1
0
mirror of https://github.com/tabler/tabler.git synced 2026-08-10 05:12:28 +04:00

chart bg fix

This commit is contained in:
chomik
2018-02-23 00:46:02 +01:00
parent fb6ed1a7b1
commit 23e1ad554e
2 changed files with 53 additions and 51 deletions
+2 -2
View File
@@ -14,6 +14,6 @@
</div>
</div>
{% contentfor scripts %}
<script>
{% include js/chart-bg.js id=include.id color=color %}
{% endcontentfor %}
</script>
+51 -49
View File
@@ -1,56 +1,58 @@
require(['c3'], function (c3) {
var chart = c3.generate({
bindto: '#{{ include.id }}',
padding: {
bottom: -10,
left: -1,
right: -1
},
data: {
names: {
data1: 'Users online',
require(['c3', 'jquery'], function (c3, $) {
$(document).ready(function() {
var chart = c3.generate({
bindto: '#{{ include.id }}',
padding: {
bottom: -10,
left: -1,
right: -1
},
columns: [
['data1', 30, 40, 10, 40, 12, 22, 40],
],
type: 'area'
},
legend: {
show: false
},
transition: {
duration: 0
},
point: {
show: false
},
tooltip: {
format: {
title: function (x) {
return '';
}
}
},
axis: {
y: {
padding: {
bottom: 0,
data: {
names: {
data1: 'Users online'
},
show: false,
tick: {
outer: false
}
columns: [
['data1', 30, 40, 10, 40, 12, 22, 40]
],
type: 'area'
},
x: {
padding: {
left: 0,
right: 0,
},
legend: {
show: false
},
transition: {
duration: 0
},
point: {
show: false
},
tooltip: {
format: {
title: function (x) {
return '';
}
}
},
axis: {
y: {
padding: {
bottom: 0,
},
show: false,
tick: {
outer: false
}
},
x: {
padding: {
left: 0,
right: 0
},
show: false
}
},
color: {
pattern: ['{{ site.colors[include.color].hex }}']
}
},
color: {
pattern: ['{{ site.colors[include.color] }}']
}
});
});
});