chart bug - removal of category on one chart breaks another chart

  • 2
  • Problem
  • Updated 4 years ago
  • Solved
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb

Posted 4 years ago

  • 2
Photo of J.

J., Official Rep

  • 7,470 Points 5k badge 2x thumb
Pat,

Check your console for JavaScript errors. Even though you are specifying a Category Field on the series, Line charts still need a Category Axis. You're defining information about theaxisthere, not just what field should show. We should probably prevent you from outright removing it in the Composer, but when you removed it, I'm betting the line chart encountered an error and anychart on the page wouldn't have rendered. Pie charts don't have Axes, so that's why there is no category when you click on the donut chart.

Side note, the reason that the Category Field property shows up in the series definition for your Line chart is that you have specified a model for the series. As long as the series is on the same model as the default for the chart, you don't need to do this, and it will use whatever field/template you've specified in your Category Axis definition. Make sense?
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Uncaught TypeError: Cannot read property 'type' of undefinedhttps://na5.salesforce.com/17181/logo180.png

Failed to load resource: the server responded with a status of 404 (Not Found)
2prod_chart.js:2

Uncaught TypeError: Cannot read property 'reflow' of undefinedprod_chart.js:2 (anonymous function)skuid__SkuidJS:27 (anonymous function)
Photo of J.

J., Official Rep

  • 7,470 Points 5k badge 2x thumb
Yep. Add that Category Axis back in, and it should fix the page. Consider using the Axis's Category Field/Template options rather than the series ones. We'll work on making it so that everything doesn't totally blow up if you find yourself in this same scenario (and making it less likely that you do find yourself in this scenario).