-
Notifications
You must be signed in to change notification settings - Fork 327
features legend
강지웅/FE개발팀/NE edited this page May 3, 2016
·
8 revisions
- This section introduces about feature of legend.
Using legend.align
option, you can change align of legend.
Kind of align options are 'top', 'bottom', 'left', 'right'.
The pie chart can be used in addition to the type of option values , such as the 'center', 'outer'.
//...
var options = {
legend: {
align: 'top'
}
};
tui.chart.barChart(container, data, options);
Using legend.hidden
option, you can hide legend.
//...
var options = {
legend: {
hidden: true
}
};
tui.chart.barChart(container, data, options);
Using legend.hasCheckbox
option, you can hide checkbox of legend.
The default value for this option is true
and will be hidden when you set up false
.
//...
var options = {
legend: {
hasCheckbox: false
}
};
tui.chart.barChart(container, data, options);
If you attach selectLegend
event handler, you can getting information of legend when selecting legend.
//...
var chart = tui.chart.barChart(data);
chart.on('selectLegend', function(info) {
console.log(info);
});
- Chart Guide