Jump to content

How to Reduce Gaps Between Charts in Spotfire


Go to solution Solved by Jose Leviaguirre,

Recommended Posts

Posted (edited)

In the case of cross tables, I can use IronPython to reduce the Row header width to 0, effectively hiding it.

(vis.As[CrossTablePlot]().RowHeaderWidths.Item[0]=0)

However, the gaps between charts remain visible, making it impossible to present them as a single, unified chart.

Even when I set the spacing to 0 in the visualization theme settings, the issue persists.

 

Is there a way to use CSS or JavaScript to make two charts appear as a single chart by eliminating the gaps between them?

(Note: Using transformations is not an option in this case.)

 

I want to combine the Origin chart and the Change chart into one without using a transformation.

 

crosstable.png

Edited by spotfire_community
  • Solution
Posted

Hello there, 

Assuming you are already using a custom Canvas styling to hide the borders between visualizations, here are a couple of ways:

Method 1 - Using annotations
There are different ways to do so. The simplest is to use an empty annotation and have it match the same color as your header. In this case I use a light yellow one and a white one to hide the extra height of the first annotation.
image.png.afdaabcaf24e0cce0fb46a24734bd674.png
Method 2 - Using CSS
Another approach is to place a div element to fill that gap and apply a css rule like this:

#gapFiller {
    background: #fff9cf;
    height: 17px;
    width: 30px;
    position: fixed;
    top: 67px;
    left: 445px;
    z-index: 999;
    border: 1px dashed;
}

image.png.6e1d94c52c92517ad182a36ba9aa8e36.png

To ensure the annotation or div remains in the same place when resizing the window, the canvas must be set to fixed from file > document properties > canvas - size. 

IT will require some additional scripting to be able to reposition the div to the corresponding place when scrolling or resizing the window, but not sure if this is required in your case or the fixed canvas is sufficient.

 

 

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...