我有一个Morris条形图,我想在图表中隐藏“ b”,但在图例中显示标签。有可能这样做吗?
Morris.Bar({
element: 'transactions',
data: [
{% for transaction in transactions %}
{
y: '{{ transaction.0|date:'d-m-Y' }}',
a: {{ transaction.1 }},
b: {{ transaction.2 }}
},
{% endfor %}
],
xkey: 'y',
ykeys: ['a', 'b'],
labels: ['Count', 'Sum'],
resize: true,
hideHover: true,
lineColors: ['#33414E', '#95B75D'],
xLabelAngle: 40,
});