cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Sparkline Disappearing in Widget

ChesAsosa
8 - Cloud Apps
8 - Cloud Apps

Good morning,

I am new to Sparklines in Blox and running into an issue where some of my sparklines will show data but will not scale so that you can see the trend line on the indicator. I have attached a screenshot of two cards created using a template. One seems to work fine and scales to show every data point but the other only shows the number on the filtered indicator.

I have attached the JSON code for both widgets. The back charge widget is the one working fine and the change order widget is the one where the line is not scaling properly. I have tried to resolve this on my own by adjusting the size of the lines but have had no luck. I am not sure if there is something I am doing wrong in the JSON code or if there is some way I can manually adjust the scaling of the line that I am not seeing. 

1 ACCEPTED SOLUTION

The problem is that these nulls only show up because of the groupby and apparently that will just give you those nulls (or at least I haven't found an alternative yet).

I tried wrapping an IF statement around the formula with an ISNULL check:
IF(ISNULL(([YourFormula]), 0, ([YourFormula])) but that still got me the same results.

This might be worth a try (pretty hacky though):
Blox won't let you put value filters on a widget, but if there's a value filter already *on* the widget when you make a Blox widget out of it, it appears to stay put. So.
- Copy your Blox code somewhere (or save it as a template)
- Change widget type to Pivot (or line/column chart)
- Select the filter option in the formula panel for your sparkline.
- You want a value filter, I used >0 but if you have negative values pick something else that will include all your actual possible values. Apply the filter.
- Change widget type back to Blox and reapply your Blox design.
- Apply the widget changes.

This will remove the days with no data from the sparkline -- but also from the main total and any other sparklines you might have in the same widget. And it won't show the gaps. But it *will* at least show a sparkline.

So probably if this technique is employed, it is best employed in a widget where this sparkline is isolated.

View solution in original post

4 REPLIES 4

irismaessen
11 - Data Pipeline
11 - Data Pipeline

I've had issues with sparklines not showing up because of null values in the source data for them. Could that be the case here? So over the 3 months you're showing here, there are some days where the value for change order is null while there are no days where that is the case for back charge?

Iris

Hello Iris, 

That does appear to be the problem with this and one other sparkline I have set up. Is there a way I can set the sparkline to make nulls show up as 0s so the line does not disappear?

The problem is that these nulls only show up because of the groupby and apparently that will just give you those nulls (or at least I haven't found an alternative yet).

I tried wrapping an IF statement around the formula with an ISNULL check:
IF(ISNULL(([YourFormula]), 0, ([YourFormula])) but that still got me the same results.

This might be worth a try (pretty hacky though):
Blox won't let you put value filters on a widget, but if there's a value filter already *on* the widget when you make a Blox widget out of it, it appears to stay put. So.
- Copy your Blox code somewhere (or save it as a template)
- Change widget type to Pivot (or line/column chart)
- Select the filter option in the formula panel for your sparkline.
- You want a value filter, I used >0 but if you have negative values pick something else that will include all your actual possible values. Apply the filter.
- Change widget type back to Blox and reapply your Blox design.
- Apply the widget changes.

This will remove the days with no data from the sparkline -- but also from the main total and any other sparklines you might have in the same widget. And it won't show the gaps. But it *will* at least show a sparkline.

So probably if this technique is employed, it is best employed in a widget where this sparkline is isolated.

Thank you, Iris!

That appears to have worked. I will apply this to some other lines giving me similar issues.