Skip to content
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

[DEV-8445] Move Chart Height Up in Editor #1351

Merged
merged 1 commit into from
Jun 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,27 @@ const PanelGeneral: FC<PanelProps> = props => {
</AccordionItemHeading>
<AccordionItemPanel>
<Select value={visualizationType} fieldName='visualizationType' label='Chart Type' updateField={updateField} options={enabledChartTypes} />
{visSupportsChartHeight() && config.orientation === 'vertical' && (
<TextField
type='number'
value={config.heights.vertical}
section='heights'
fieldName='vertical'
label='Chart Height'
updateField={updateField}
// TODO: when PMs have a decision on content here we can update the tooltip
// tooltip={
// <Tooltip style={{ textTransform: 'none' }}>
// <Tooltip.Target>
// <Icon display='question' style={{ marginLeft: '0.5rem' }} />
// </Tooltip.Target>
// <Tooltip.Content>
// <p>Adjust the height of the chart area.</p>
// </Tooltip.Content>
// </Tooltip>
// }
/>
)}
{(visualizationType === 'Bar' || visualizationType === 'Combo' || visualizationType === 'Area Chart') && <Select value={visualizationSubType || 'Regular'} fieldName='visualizationSubType' label='Chart Subtype' updateField={updateField} options={['regular', 'stacked']} />}
{visualizationType === 'Area Chart' && visualizationSubType === 'stacked' && <Select value={config.stackedAreaChartLineType || 'Linear'} fieldName='stackedAreaChartLineType' label='Stacked Area Chart Line Type' updateField={updateField} options={Object.keys(approvedCurveTypes)} />}
{visualizationType === 'Bar' && <Select value={config.orientation || 'vertical'} fieldName='orientation' label='Orientation' updateField={updateField} options={['vertical', 'horizontal']} />}
Expand Down Expand Up @@ -260,8 +281,6 @@ const PanelGeneral: FC<PanelProps> = props => {
}
/>
)}

{visSupportsChartHeight() && config.orientation === 'vertical' && <TextField type='number' value={config.heights.vertical} section='heights' fieldName='vertical' label='Chart Height' updateField={updateField} />}
</AccordionItemPanel>
</AccordionItem>
)
Expand Down