1
.legend(dc.legend().x(0).y(5).itemHeight(5).gap(8).horizontal(1)
.legendWidth(90).itemWidth(95).legendText(function (d) {
if (d.name == 'category4') {
return ' VI>20 ' + " " + " : " + d.data;
}
if (d.name == 'category3') {
return 'VI>10 and <=20 ' + " " + " : " + d.data;
}
if (d.name == 'category2') {
return 'VI>5 and <=10 ' + " " + " : " + d.data;
}
if (d.name == 'category1') {
return 'VI<=5 ' + " " + " : " + d.data;
};
}));
に適切なアライメントと異なる色で伝説の横に伝説の値を追加することができます。はどのように我々は、私は別の色と適切に整列して<code>d.data</code>を表示したいdc.js