I tried all these, but still I don't get the month names continuously in my charts. The X-axis labels skips few months in between by 2 or 3. Any fix for this issue ?
You can put %b in x-axis to order by month name
Originally posted by @RenanLeiteBay in #29237
Comment From: dosubot[bot]
Hey @bsenthilbalu! 👋 I'm here to help you with your coding conundrums!
To ensure continuous display of month names on the x-axis in Apache Superset, you might want to check the minInterval
property, which determines the intervals for x-axis labels in time series charts. This property is influenced by the xAxisType
and timeGrainSqla
. If the xAxisType
is set to AxisType.Time
and timeGrainSqla
is defined, the minInterval
is mapped to a timestamp value. If these conditions are not met, the minInterval
defaults to 0, which might cause skipping of months [1].
Additionally, ensure that your time grain settings are correctly configured to reflect monthly intervals. If the issue persists, it might be related to known issues such as time range filters not being applied correctly or time grain not being set when using Jinja in datasets [2].
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other
Comment From: bsenthilbalu
Hey @bsenthilbalu! 👋 I'm here to help you with your coding conundrums!
To ensure continuous display of month names on the x-axis in Apache Superset, you might want to check the
minInterval
property, which determines the intervals for x-axis labels in time series charts. This property is influenced by thexAxisType
andtimeGrainSqla
. If thexAxisType
is set toAxisType.Time
andtimeGrainSqla
is defined, theminInterval
is mapped to a timestamp value. If these conditions are not met, theminInterval
defaults to 0, which might cause skipping of months [1].Additionally, ensure that your time grain settings are correctly configured to reflect monthly intervals. If the issue persists, it might be related to known issues such as time range filters not being applied correctly or time grain not being set when using Jinja in datasets [2].
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other
Where I can see that mininterval property in the Superset chart properties ?
Comment From: hainenber
Can you add screenshot of line/bar charts affected by the issue? The image in description came from old post so I don't know what to debug.
Kindly anonymize any PII data if necessary.
Comment From: bsenthilbalu
Please see below
Comment From: rusackas
It seems like it just skips some because the labels are too long to fit on all the X axis ticks. What would be your proposed solution?
Comment From: mistercrunch
Comment From: mistercrunch
We'd need a new Control in the panel x_axis_interval
with a default of auto
, or similar. I'm still thinking that for long tail stuff, a JSON blob could catch the long tail of properties that are rarely needed. It's not a great user experience, but allows people to have a solution without creating a control for each one of the hundreds of echarts props.
Comment From: rusackas
I've been wanting to add that "Advanced" JSON input control. Ideally, it would also support Handlebars or similar to plop data into the options as needed. We don't have a great reusable control input (yet) that does this nicely, so I'd want to start there.
Comment From: rusackas
Opened a PR... I've run into this enough times for it to bother me!