X axis for bar charts difficult to read

Hi,
I use bar charts a lot as they are easy to read for my users. When I leave the x-axis on "ordinal", the graph looks good but the x-axis description overlap and is impossible to read:

When I change the x-axis to "timeseries" the x-axis description is easy to read but the bars look weird:

Is there a way to have the best of both worlds - e.g. having proper bars even when you define it as time series or having only a few of the descriptions on the x-axis to make it readable even when the x-axis is ordinal?

As I had to change all the bar charts to time series to make it look good again I assume this is new in 0.25.1 as the ordinal graphs looked good when I created them a few versions ago.

Thanks, Eva

This is fixed on master and the fix will be included in 0.27 :slight_smile:

2 Likes

yay! :slight_smile:

Hi @maz, looks nice now in 0.27! :+1:

1 Like

Glad to hear it! :smiley:

Hi,
I'm very glad to write my first message in Metabase Discussion.
I would like to extend the topic asking if it's possible or not to rotate form horizontal position to vertical position labels X-axis in order to see all labels X-axis ?

Thanks for your answer.
Stéphane

Hi @SBoisson & welcome :slight_smile:

You cant rotate currently - but a design for it has recently been created on top of a newly created issue … so looks like it’s in the pipeline somewhere …

1 Like

Thanks a lot Jornh !

1 Like

Hi, I have created a time series graph. Set the X Axis to Date. “Ordinal” is selected by default and disabled. However shows each date leading to too many data points (similar to bar graph shown in this thread)

May I know how to set X axis values to say only Months or Years etc. but still show all the time series data in the graph.

From this thread, i realise the issue is resolved, but could not figure out how to set up. Pl guide.

Many thanks, Krishna

@Krishna

Please post “Diagnostic Info” from Admin > Troubleshooting.

If “Ordinal” is the pre-selected option and it’s disabled, then it’s because you’re returning strings or another non-date type. That’s probably what is causing the problem.

There’s currently no way to make the formatting on the x-axis ticks different than the data value points.

@flamber

Thanks for prompt guidance! You are right, possibly its a string issue. Will try with proper date format. Am assuming if X axis receives a date column, it will allow to select “Time Series” option. Through which I can set, say, months.

Am new to Metabase. Just to clarify about Diagnostic Info - you wanted me to copy/paste the diagnostic details from Admin so that you are clear about my environment / version etc. ?

@Krishna
Like I said, there’s currently no way to make the formatting on the x-axis ticks different than the data value points.

The closest feature request is about removing all dates and just show time:
https://github.com/metabase/metabase/issues/11427 - upvote by clicking :+1: on the first post

If you have a feature request, then please describe it will:
https://github.com/metabase/metabase/issues/new/choose

And yes, too many people are writing with problems/questions that has already been fixed, so that’s why “Diagnostic Info” helps.

@flamber

Sure, got it. Let me try to figure out, will update you. Sharing diagnostic info.

{
“browser-info”: {
“language”: “en-US”,
“platform”: “Win32”,
“userAgent”: “Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36”,
“vendor”: “Google Inc.”
},
“system-info”: {
“file.encoding”: “Cp1252”,
“java.runtime.name”: “Java™ SE Runtime Environment”,
“java.runtime.version”: “1.8.0_241-b07”,
“java.vendor”: “Oracle Corporation”,
“java.vendor.url”: “http://java.oracle.com/”,
“java.version”: “1.8.0_241”,
“java.vm.name”: “Java HotSpot™ 64-Bit Server VM”,
“java.vm.version”: “25.241-b07”,
“os.name”: “Windows 7”,
“os.version”: “6.1”,
“user.language”: “en”,
“user.timezone”: “Asia/Calcutta”
},
“metabase-info”: {
“databases”: [
“h2”,
“mysql”
],
“hosting-env”: “unknown”,
“application-database”: “h2”,
“application-database-details”: {
“database”: {
“name”: “H2”,
“version”: “1.4.197 (2018-03-18)”
},
“jdbc-driver”: {
“name”: “H2 JDBC Driver”,
“version”: “1.4.197 (2018-03-18)”
}
},
“run-mode”: “prod”,
“version”: {
“tag”: “v0.35.3”,
“date”: “2020-04-21”,
“branch”: “release-0.35.x”,
“hash”: “1d424cb”
},
“settings”: {
“report-timezone”: null
}
}
}

@flamber

Resolved the Date issue. TSdate1 is a date column.

1st chart - X Axis set to Ordinal - graph is fine, but too many values in X axis
2nd chart - X Axis set to TimeSeries - graph not ok (ignores the Y axis range I set). But X axis intervals look fine.

How to get both a proper looking chart and proper X values ?

Sorry if this is already answered earlier, tried searching, but could not locate.

Thanks

@Krishna
I would guess that you don’t have data between some of the points and have set the visualization setting “Replace missing values with” to “Nothing”.
You have way too many data points to be able to show all the x-axis ticks.

If you have a feature request, then please search Github for existing issues otherwise create a new issue and describe it well:
https://github.com/metabase/metabase/issues/new/choose

As for y-axis range, that probably this issue:
https://github.com/metabase/metabase/issues/10434 - upvote by clicking :+1: on the first post

Hi @flamber

You are right, the missing data seems to be the issue. Once i filled data for all the dates, the issue was resolved!

Thanks for ur support!