Skip to main content
Nintex Community Menu Bar
Question

Stacked Area Spline Chart with negative values misbehaving

  • July 10, 2024
  • 4 replies
  • 8 views

Forum|alt.badge.img+7

Hi All,

I have an area spline chart with positive and negative values that I am trying to stack. Ideally, negative values fall below the 0 mark, positive values go above. For some reason, the area charts don’t behave this way (see screenshot). Column charts work fine. Any ideas?

4 replies

Forum|alt.badge.img+6
  • Nintex Employee
  • July 10, 2024

Mansour,

I think the way to address this is a Highcharts setting that we don’t currently set: threshold. It looks like it’s particular to Area/Areaspline charts, but I wasn’t familiar with it before today, so I can’t say for sure. Here’s a jsFiddle showing it in action. At present, you’ll have to set this with a Before Render Snippet on your Chart to set it. Does that help?


Forum|alt.badge.img+7
  • Author
  • July 10, 2024

Thanks J, that worked great!

Here’s the snippet if anyone else runs into this:


var chartObj = arguments[0],
$ = skuid.$;

$.extend(chartObj,{
    tooltip: {
        shared:true,
        enabled:true,
        crosshairs:true
    }   ,
    plotOptions:{

   series:{
      
   threshold: 0
   }
    }
});



Forum|alt.badge.img+7
  • Author
  • July 10, 2024

Spoke too soon, that snippet removed stacking…


Forum|alt.badge.img+6
  • Nintex Employee
  • July 10, 2024

Try a recursive $.extend:

$.extend(true,chartObj,{ ... (Setting really cool options here) ... });