提交 23e1ad55 编写于 作者: C chomik

chart bg fix

上级 fb6ed1a7
......@@ -14,6 +14,6 @@
</div>
</div>
{% contentfor scripts %}
<script>
{% include js/chart-bg.js id=include.id color=color %}
{% endcontentfor %}
\ No newline at end of file
</script>
\ No newline at end of file
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'
},
legend: {
show: false
},
transition: {
duration: 0
},
point: {
show: false
},
tooltip: {
format: {
title: function (x) {
return '';
}
}
},
x: {
padding: {
left: 0,
right: 0,
axis: {
y: {
padding: {
bottom: 0,
},
show: false,
tick: {
outer: false
}
},
show: false
x: {
padding: {
left: 0,
right: 0
},
show: false
}
},
color: {
pattern: ['{{ site.colors[include.color].hex }}']
}
},
color: {
pattern: ['{{ site.colors[include.color] }}']
}
});
});
});
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册