Custom Bar/Column Chart Plugin (Show Totals, Sort Categories, Sort Breakbys)

Comments

103 comments

  • Avatar
    Elliott Herz

    Hey Pratik,

    Appreciate the feedback!

    The scope of this plugin was for a designer to pre-select the sort order of each widget. Viewers are not going to get into the edit mode of a widget to then change the sort order. So technically we can add this functionality to the dashboard level as some custom UI elements, but that is out of scope for this plugin.

    Another option, would be to make all of your viewers into designers instead, and limit the role of a designer by leveraging the customize role API. That way you can limit what the designer can do, but still give them options to edit widgets (edit the sort order).

    Best, Elliott

    0
    Comment actions Permalink
  • Avatar
    Brian Wilson (Edited )

    Hey Elliott,

    Have a strange case using a stacked bar chart:

     

    Right now I can only sort by the raw numbers in the values, So here, New York has the highest number of responses, but St. Louis has the largest of percentage of responses. Is there a way to sort by that percentage?

    Here's a pivot -- Currently sorting by Col A, but I'd like to sort by Col C

    0
    Comment actions Permalink
  • Avatar
    Elliott Herz

    Hey Brian,

    I would tackle this use-case more out of the box.

     

    I added a third value which is actually the percentage calculated out, which you can then sort on (granularity is super tiny compared to the rest of the numbers, so it looks like there are only 2 parts to the bar.

     

    You can also hide the 3rd value (sort value), by leveraging the the additional tooltip plugin:

    https://support.sisense.com/hc/en-us/community/posts/221225348-Additional-Data-Chart-Tooltip-Plugin

    Which would also require a 1 line widget script to hide the value (adds it to the tooltip):

    prism.additionalInfoTooltip (widget, {seriesIndexes:[2],displayCurrentSelection:true});

     

    Hope this helps, this seems easier and more out of the box then trying to do it through a widget script or by updating this plugin.

    Best, Elliott

    0
    Comment actions Permalink
  • Avatar
    Elliott Herz

    V2.8.5 just dropped!

    Fixed console errors when Show Totals is selected and a chart returns no results. Fixed the Show Totals when a bar is negative (both stacked and non-stacked). Fixed the axis min/max values when Negative numbers are introduced.

    Hope you enjoy!  =D

     

    0
    Comment actions Permalink
  • Avatar
    120002203

    how to add % to a stacked bar chart? I did see a pic of it, but not the functionality in plugin.

    0
    Comment actions Permalink
  • Avatar
    Elliott Herz (Edited )

    V2.9.0 just dropped!

    Support for multiple series types! You can now have lines/areas/splines mixed up with this plugin. Also fixed the dynamic y-axis to update appropriately (Your welcome Dave).

    Hope you enjoy!  =D

     

     

    Adding an AVG line (also sorted on that avg line):

     

     

    0
    Comment actions Permalink
  • Avatar
    Teh Wenhui

    Hi Elliott,

    I am facing an error on the chart when this plugin is enabled.

     

    For your info, I applied the plugin of switch dimension in this widget.

    0
    Comment actions Permalink
  • Avatar
    Elliott Herz

    Hi Teh,

    The plugin has never supported more than 1 field in the Categories Section, I can tell you have 2 fields. In addition, I haven't tested it with the switchable dimension plugin, but I believe it should work.

    Best, Elliott

    0
    Comment actions Permalink
  • Avatar
    Teh Wenhui

    Hi Elliott,

    The custom column/bar chart plugin is not necessary for this widget but it is used in others widget in this and other dashboards.
    Therefore, disabling this or switchable dimensions is not feasible for me.

    Could you help me to test on it? 

    0
    Comment actions Permalink
  • Avatar
    Aaron Warnke (Edited )

    Great Job on this Elliott!

    Thank you!

    1
    Comment actions Permalink
  • Avatar
    Elliott Herz

    Hey Aaron,

    Thank you for the feedback! Also appreciate the name correction!  =D

     

    Hey Teh,

    I'm not finding any issues on my end with the 2 plugins together. Here is an example I built to always show the top 10 of whatever category is picked, users can dynamically right click to change the category:

     

    Can you provide more specific instances where the 2 plugins don't work together?

     

    Best, Elliott

    0
    Comment actions Permalink
  • Avatar
    Teh Wenhui

    Hi Elliott,

    It should be because there are two fields in categories.

    After I removed one of the fields, it back to normal now.

    Thanks!

    0
    Comment actions Permalink
  • Avatar
    Brian Wilson

    Hi Elliott,

     

    Is it possible to get the stacked area chart working with a break-by sorted by total?

     

    So, the exact setup as this column chart, but area instead:

     

    0
    Comment actions Permalink

Please sign in to leave a comment.