I am using C3.js and needs to display custom legend text instead data1, data2, etc in the legend. So I have used names property but still the customized legends text is not appearing.
The following is my code :
$scope.chart1 = {
size: {
height: 175
// width: 480
},
data: {
type: 'pie',
columns: [
['data1', 45],
['data2', 100],
['data3', 60],
['data4', 5]
]
},
tooltip: {
},
legend: {
show: true,
position: 'right'
},
names: {
'data1': 'warning',
'data2': 'success',
'data2': 'info',
'data2': 'danger'
}
};
Can any one help what is the right way to display custom legend texts?