Is it possible in chartjs to hide certain dataset legends?
问题 Is it possible to only hide certain dataset legends in chartjs? I know it is possible to hide all with options: { legend: { display: false 回答1: Short answer: Yes it is possible. Unfortunately it's not quite as simple as the developers could make it. If you know what the text value of the item being displayed in the legend is, then you can filter that out. After reading through the Chart.js docs I found the section Legend Label Configuration that details a filter function that can be used to