-
Notifications
You must be signed in to change notification settings - Fork 14.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
line chart x-axis order field that number and string concat has problem #31696
Comments
To correctly order a line chart's x-axis when concatenating numbers and strings, such as "1a", "2b", and "10c", in Superset version master/latest-dev, you should use the Here's the relevant configuration: export const forceCategorical: ControlSetItem = {
name: 'forceCategorical',
config: {
type: 'CheckboxControl',
label: t('Force categorical'),
default: false,
renderTrigger: true,
description: t('Make the x-axis categorical'),
},
}; By enabling the To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
Now , I use 4.1.1 version that have forceCategorical and if not How can i upate it I use docker? |
Yes, Superset version 4.1.1 includes the If you need to update Superset using Docker, follow these steps:
However, since the To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
Sorry , I'm newbie apache superset. I can not find checkbox UI for enable it. Cloud you please step by step for set it? |
To enable the
If you don't see the "Force categorical" option, ensure that your Superset version is up-to-date and that the chart type you're using supports this feature. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
Sorry I can not found Force categorical" checkbox in Superset UI in version 4.1.1 in Line Chart. How can i check it? or custom it? |
To find or customize the "Force categorical" checkbox in the Superset UI for a Line Chart in version 4.1.1, you can refer to the following code snippet from the export const xAxisForceCategoricalControl = {
name: 'xAxisForceCategorical',
config: {
type: 'CheckboxControl',
label: () => t('Force categorical'),
default: false,
description: t('Treat values as categorical.'),
initialValue: (control: ControlState, state: ControlPanelState | null) =>
state?.form_data?.x_axis_sort !== undefined || control.value,
renderTrigger: true,
visibility: ({ controls }: { controls: ControlStateMapping }) =>
checkColumnType(
getColumnLabel(controls?.x_axis?.value as QueryFormColumn),
controls?.datasource?.datasource,
[GenericDataType.Numeric],
),
shouldMapStateToProps: () => true,
},
}; This code defines the "Force categorical" checkbox control. You can customize its properties such as If you cannot find this option in the UI, ensure that your Superset instance is correctly configured to display this control, and check if any customizations or restrictions might be hiding it. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
Bug description
I need field number and string concat to x-axis but I have problem to order it
example: 1a ,2b, 10c line chart order x-axis that order by 1a, 10c, 2b
Screenshots/recordings
No response
Superset version
master / latest-dev
Python version
3.9
Node version
16
Browser
Chrome
Additional context
No response
Checklist
The text was updated successfully, but these errors were encountered: