Layout Bug? Map next to Chart not laid out the same.

558
6
01-26-2022 10:10 AM
NFlourish
Occasional Contributor

I am laying out a new Hub site. I put a 500px high map next to a 500px high chart in the same row. The margins for the map and chart make them not show on page lined up with each other. See screen capture.

 

Why is the map higher in the row compared to the charts? Why does the chart have a right margin and the map does not? I have not customized the theme or CSS for the Hub site at all.

Screen Shot 2022-01-26 at 1.05.20 PM.png

 

Tags (2)
6 Replies
KlaraSchmitt
Esri Contributor

Hi @NFlourish,

I'm sorry that you are experiencing issues. Do you have a public url that you could share? I am unable to reproduce this issue on my own site and the two cards (map card, chart card) really should be at the same baseline height, especially since you have the titles off on both. This seems like a bug, but it'd help if I could inspect your site.

0 Kudos
NFlourish
Occasional Contributor

Here is the current Hub... thanks!

 

https://cwd-smp-cambridgegis.hub.arcgis.com/

0 Kudos
KlaraSchmitt
Esri Contributor

Would you be able to temporarily make the site public so I can take a look?

0 Kudos
NFlourish
Occasional Contributor

Oh - sorry - I thought had Esri had the ability to just ignore the sharing settings. Should be viewable. Had to change the map for privacy reasons.

0 Kudos
KlaraSchmitt
Esri Contributor

Thanks! I didn't realize you were using the "wide" layout in your row. Now I can reproduce on my own site. You can change your site back to the settings you had before. I'll take a look at the issue and get back to you.

0 Kudos
KlaraSchmitt
Esri Contributor

@NFlourish,

While I know we applied margins on some elements - like the Text Card - so that they wouldn't be flush up against the edges of the row in wide layouts, I honestly do not recall the reasoning for the chart card. I can bring it up to the team as something we may want to change, but since it would likely affect a lot of other sites, it's hard to know the repercussions of doing that.

However, I can give you a code snippet that will fix it for your site. If you add a class to the row, which can be found in the Appearance section of row settings:

Screen Shot 2022-01-27 at 1.47.22 PM.png

Then in a Text Card somewhere on the page, if you select the </> Edit in HTML button, you can add an embedded style that can target the row. In the Text Card HTML editor, you want to add:

.no-margins-chart .wideRowClass .chart-card {
margin: 0px;
}

You do want to be careful to always wrap any system level classes (.wideRowClass .chart-card) in something unique because otherwise our CSS might collide with your styling. But with a unique row class wrapped around the system classes, you should be fine.

Hope that helps!

0 Kudos