Comments (3)
This is currently working as designed since the legend shows the labels of the labels array and hides the items of that label. If you want to hide all the items of a dataset you will need to overwrite the onclick handler and write custom logic
from chart.js.
@gshunc as @LeeLenaleee reported, you need to customize some default behavior of the chart.
See the codepen and if it is addressing your need:
https://codepen.io/stockinail/pen/OJGBxwy
from chart.js.
Closing as this is currently working as designed and can be customized
from chart.js.
Related Issues (20)
- Setting Y-Min for bar chart messes with interactions/tooltips HOT 1
- ticks padding does not work as expected
- padding for the legend
- Clip option on scale doesn't do anything
- Cannot read properties of null (reading 'getContext')
- Y-labels cropped way too early for vertically stacked axes
- Ticks callback function don't return initial value labels HOT 2
- floating point on y axis HOT 8
- Easy API for setting background color on each dataset's tooltip
- Hovering functionality for long labels
- Angular application reacting slow once multiple chart loaded into page. HOT 1
- Title padding does not appear to be scriptable (or type needs updating?)
- Provide an API using composition DP to build graphs
- Vertical Gradient to each bar are not able to set grouped Bar chart. (Sets the createLinearGradient for the whole graph, not for individual bars). HOT 1
- Tooltip content is not hoverable
- Dynamic text resize is not supported HOT 3
- Mix multiple bar and line HOT 2
- Issue with Updating Charts -> Adding or Removing Data code example HOT 2
- Set label of piechart/donut chart using parsing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chart.js.