mirror of
https://github.com/tabler/tabler.git
synced 2026-08-11 13:52:21 +04:00
chart bg fix
This commit is contained in:
@@ -14,6 +14,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% contentfor scripts %}
|
<script>
|
||||||
{% include js/chart-bg.js id=include.id color=color %}
|
{% include js/chart-bg.js id=include.id color=color %}
|
||||||
{% endcontentfor %}
|
</script>
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
require(['c3'], function (c3) {
|
require(['c3', 'jquery'], function (c3, $) {
|
||||||
|
$(document).ready(function() {
|
||||||
var chart = c3.generate({
|
var chart = c3.generate({
|
||||||
bindto: '#{{ include.id }}',
|
bindto: '#{{ include.id }}',
|
||||||
padding: {
|
padding: {
|
||||||
@@ -8,10 +9,10 @@ require(['c3'], function (c3) {
|
|||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
names: {
|
names: {
|
||||||
data1: 'Users online',
|
data1: 'Users online'
|
||||||
},
|
},
|
||||||
columns: [
|
columns: [
|
||||||
['data1', 30, 40, 10, 40, 12, 22, 40],
|
['data1', 30, 40, 10, 40, 12, 22, 40]
|
||||||
],
|
],
|
||||||
type: 'area'
|
type: 'area'
|
||||||
},
|
},
|
||||||
@@ -44,13 +45,14 @@ require(['c3'], function (c3) {
|
|||||||
x: {
|
x: {
|
||||||
padding: {
|
padding: {
|
||||||
left: 0,
|
left: 0,
|
||||||
right: 0,
|
right: 0
|
||||||
},
|
},
|
||||||
show: false
|
show: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
color: {
|
color: {
|
||||||
pattern: ['{{ site.colors[include.color] }}']
|
pattern: ['{{ site.colors[include.color].hex }}']
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user