You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
even though the parameter id of LegendOptions.item.onclick is defined as DataItem type, it actually is a string type value which shows the id of a selected legend item.
options.d.ts > LegendOptions > item
onclick, onover, onout share the same parameter type.
Steps to check or reproduce
// base cssimport'billboard.js/dist/theme/insight.css';importbbfrom'billboard.js';// for ESM environment, need to import modules as:// import bb, {pie} from "billboard.js"varchart=bb.generate({data: {columns: [['data1',100],['data2',300],['data3',200]],type: 'pie'// for ESM specify as: pie()},legend: {contents: {bindto: '#legend',template:
"<span style='color:#fff;padding:10px;background-color:{=COLOR}'>{=TITLE}</span>"},item: {onclick: id=>console.log(id)}},bindto: '#legendTemplate1'});
The text was updated successfully, but these errors were encountered:
bb-in-hoodie
changed the title
wrong type of a parameter 'id' of LegendOptions.item.onclick
wrong type of parameter 'id' of LegendOptions.item.onclick
Jul 20, 2021
Description
even though the parameter
id
ofLegendOptions.item.onclick
is defined asDataItem
type, it actually is astring
type value which shows the id of a selected legend item.onclick
,onover
,onout
share the same parameter type.Steps to check or reproduce
The text was updated successfully, but these errors were encountered: