Midwest Dev Chat

MidwestDevChat.com

  • The newest 15 messages in the super-cool #javascript channel.

  • 03/19 15:19:52 Eliseo: Does anyone know how to get chartjs to hide pie slices on click? I know you can click on the legend, but getting it to work by clicking on the slices is a bit more tricky... here is a demo I set up - https://jsfiddle.net/Mottie/4f7be15p/ - I commented out the code that actually removes the data since it doesn't re-render the chart.
  • 03/19 15:51:25 Garrett: Looks like it works if you click the blocks beneath the chart, but this error pops if you click directly on a pie slice: `Uncaught ReferenceError: chart is not defined`
  • 03/19 15:52:22 Garrett: Is `chart` actually defined anywhere for the line `chart.update()`?
  • 03/19 15:53:08 Garrett: Disclaimer: I know nothing about chart.js itself; just trying to be helpful with the console, but you may have already figured out all of this.
  • 03/19 15:55:02 Garrett: Yeah I probably shouldn’t have jumped in here grimacing
  • 03/19 16:18:14 Eliseo: hehe naw it's fine... yeah the label blocks below the pie chart have that feature built-in. I was trying to duplicate that behavior by clicking on the pie slice.
  • 03/19 16:18:42 Eliseo: And `chart` is defined as `myChart` in that demo
  • 03/19 16:21:27 Eliseo: I updated the demo to fix that... still not working disappointed
  • 03/20 08:21:39 Magaret: I’ve said for awhile that JS is moving towards Java and Java is moving towards JS. In the middle is Groovy
  • 03/20 08:22:04 Magaret: Now if we could just get a JS testing framework like Spock.
  • 03/20 16:56:17 Hae: Mottie—on the frontiers of JavaScript
  • 03/20 16:56:27 Hae: Where no person has ever gone before
  • 03/20 16:56:31 Hae: nor should they
  • 03/20 16:56:36 Hae: _salutes_
  • *Usernames have been changed to protect the innocent.
We're currently 1149 members strong. Join us!
Request Invite

Check out all the cool channels!

Join the conversation!