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

[RCA] Remove x-axis and labels from library visualizations #192994

Merged
merged 7 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
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 @@ -89,6 +89,11 @@ function LegacyEmbeddable({ type, config, timeRange: { from, to }, savedObjectId
from,
to,
},
overrides: {
axisX: { hide: true },
axisLeft: { style: { axisTitle: { visible: false } } },
settings: { showLegend: false },
},
};

if (savedObjectId) {
Expand Down Expand Up @@ -188,7 +193,7 @@ export function registerEmbeddableItem({
grow={true}
className={css`
> div {
height: 196px;
height: 128px;
}
`}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,11 @@ export function EsqlWidget({ suggestion, dataView, esqlQuery, dateHistogramResul
<lens.EmbeddableComponent
{...previewInput.value}
style={{ height: 128 }}
overrides={{ axisX: { hide: true } }}
overrides={{
axisX: { hide: true },
axisLeft: { style: { axisTitle: { visible: false } } },
settings: { showLegend: false },
}}
/>
);
} else {
Expand All @@ -147,7 +151,11 @@ export function EsqlWidget({ suggestion, dataView, esqlQuery, dateHistogramResul
<lens.EmbeddableComponent
{...input}
style={{ height: 128 }}
overrides={{ axisX: { hide: true } }}
overrides={{
axisX: { hide: true },
axisLeft: { style: { axisTitle: { visible: false } } },
settings: { showLegend: false },
}}
/>
</EuiFlexItem>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,17 +178,6 @@ export function LensWidget({

const attributesLens = new LensAttributesBuilder({
visualization: new XYChart({
visualOptions: {
axisTitlesVisibilitySettings: {
x: false,
yLeft: false,
yRight: false,
},
legend: {
isVisible: false,
position: 'right',
},
},
layers,
formulaAPI: formulaAsync.value.formula,
dataView,
Expand Down Expand Up @@ -227,7 +216,11 @@ export function LensWidget({
query={(searchConfiguration?.query as Query) || defaultQuery}
disableTriggers={true}
filters={filters}
overrides={{ axisX: { hide: true } }}
overrides={{
axisX: { hide: true },
axisLeft: { style: { axisTitle: { visible: false } } },
settings: { showLegend: false },
}}
/>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,6 @@ export function getLensAttrsForSuggestion({
dataView,
}) as TypedLensByValueInput['attributes'];

attrs.state.visualization = {
...(attrs.state.visualization as any),
axisTitlesVisibilitySettings: {
x: false,
yLeft: false,
yRight: false,
},
legend: {
isVisible: false,
position: 'right',
},
};

const lensEmbeddableInput: TypedLensByValueInput = {
attributes: attrs,
id: v4(),
Expand Down