Center Zero Intersect On Bar Charts
Download: Center Zero Intersect
Introduction
This article explains how to center the zero intersect of a bar chart. This can be done manually be setting the axis min/max, but this solution provides a way to do this dynamically.

Steps
STEP 1 - ADD THE PLUGIN
Download the attachment and unzip the contents into your C:\Program Files\Sisense\PrismWeb\plugins\ folder. If you are using version 7.2 and higher unzip the contents into your C:\Program Files\Sisense\app\plugins\ folder. If the plugins folder doesn't exist, just create it. After those files have been unzipped there, you may also have to restart the web server. Now, when you create a new bar chart the settings menu should contain an option for centering the zero intersect.
STEP 2 - CREATE THE CHART
Create a bar chart that has at positive and negative values. In the Widget Editor, open the settings menu (see image above) for the widget and check the option under Center Zero Intersect to Enabled. This will make sure the zero intersect is centered on the chart. You can also check the option to Show Plotline, that will draw a black line on the chart to highlight the zero intersect.
References/Notes
- This plugin is built for bar charts.
- Also added an option to set offsets based on a percentage. The default is to center the x-axis at zero, but you can instruct the chart to just shift the offset in either direction based on a percentage. Some default percentages are included, but if you want to add your own just open up centerZeroIntersect.js and modify the percentOptions array on line 10.

Updated 03-02-2023
intapiuser
Admin
Joined December 15, 2022