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

Update dependency @elastic/charts to v61 (main) #170914

Merged
merged 46 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
57e9f12
Update dependency @elastic/charts to v61
renovate[bot] Nov 8, 2023
ca167d5
fix: metric background breaking change
nickofthyme Nov 14, 2023
b3f8e27
chore: migrate all current theme usage to legacy, merge eui usages
nickofthyme Nov 14, 2023
31bbe74
chore: remove unneeded size hacks on tickLine styles
nickofthyme Nov 14, 2023
f5a8ecf
chore: remove usage of chart plugin theme.useChartsTheme
nickofthyme Nov 14, 2023
737b4e3
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Nov 14, 2023
b1bbf64
chore: remove theme from charts theme service
nickofthyme Nov 14, 2023
8c7eec5
fix: type and test errors
nickofthyme Nov 14, 2023
dbf047c
fix bad chart margins in xy expression renderer
nickofthyme Nov 15, 2023
e43fe2d
use max of old outsideDimensions
nickofthyme Nov 15, 2023
3e7bf25
verify and update screenshot changes
nickofthyme Nov 15, 2023
47c3f05
fix fn tests due to metric changes part 1
nickofthyme Nov 16, 2023
f8c7a95
Merge branch 'main' into renovate/main-@elasticcharts
nickofthyme Nov 16, 2023
3b5d884
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Nov 16, 2023
cd8ca2f
fix metric empty background color
nickofthyme Nov 20, 2023
a996cf2
Merge remote-tracking branch 'upstream/renovate/main-@elasticcharts' …
nickofthyme Nov 20, 2023
e31fb5f
update charts with changes to background colors
nickofthyme Nov 21, 2023
7fb3674
Merge branch 'main' into renovate/main-@elasticcharts
nickofthyme Nov 21, 2023
7eeab53
update merge errors and fix snapshots
nickofthyme Nov 22, 2023
6e161aa
update jest tests and fix margin issue
nickofthyme Nov 29, 2023
a2c806e
Merge branch 'main' into renovate/main-@elasticcharts
nickofthyme Nov 29, 2023
b8f771c
fix chart margin export constant
nickofthyme Nov 29, 2023
fbe0866
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Nov 29, 2023
54b921b
update functional test assertions and jest snapshots
nickofthyme Nov 29, 2023
5842081
Merge remote-tracking branch 'upstream/renovate/main-@elasticcharts' …
nickofthyme Nov 29, 2023
2e00558
Merge branch 'main' into renovate/main-@elasticcharts
nickofthyme Nov 30, 2023
1c568cd
update empty color in fn test case
nickofthyme Nov 30, 2023
f6dda7d
fix document count chart
nickofthyme Dec 1, 2023
b6ed576
fix memory preview chart theme
nickofthyme Dec 1, 2023
2cc3541
update chart setting usages with no defined themes
nickofthyme Dec 1, 2023
fef7db7
fix useChartThemes usages and type errors
nickofthyme Dec 1, 2023
b562086
Merge branch 'main' into renovate/main-@elasticcharts
nickofthyme Dec 1, 2023
3f9fec6
Merge branch 'main' into renovate/main-@elasticcharts
nickofthyme Dec 4, 2023
ae7a83d
fix charts with no settings used
nickofthyme Dec 4, 2023
f68cf64
assign stack accessor to current usage of histogram bar series
nickofthyme Dec 4, 2023
db0b5f1
Merge branch 'main' into renovate/main-@elasticcharts
nickofthyme Dec 4, 2023
a9695ff
Merge branch 'main' into renovate/main-@elasticcharts
nickofthyme Dec 8, 2023
385536d
use previous theme on slo_card_item chart
nickofthyme Dec 8, 2023
eb7807f
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Dec 8, 2023
2ebefe7
udapte jest snapshot
nickofthyme Dec 8, 2023
ceb8410
Merge branch 'main' into renovate/main-@elasticcharts
nickofthyme Dec 8, 2023
df419c4
Merge branch 'main' into renovate/main-@elasticcharts
nickofthyme Dec 11, 2023
eb335e4
Merge branch 'main' into renovate/main-@elasticcharts
nickofthyme Dec 12, 2023
5a618d8
Merge branch 'main' into renovate/main-@elasticcharts
nickofthyme Dec 12, 2023
5bd385e
Merge branch 'main' into renovate/main-@elasticcharts
nickofthyme Dec 12, 2023
675be34
Merge branch 'main' into renovate/main-@elasticcharts
nickofthyme Dec 13, 2023
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 @@ -8,7 +8,15 @@

import React, { useEffect, useState, FC } from 'react';

import { Chart, Settings, Axis, BarSeries, Position, ScaleType } from '@elastic/charts';
import {
Chart,
Settings,
Axis,
BarSeries,
Position,
ScaleType,
LEGACY_LIGHT_THEME,
} from '@elastic/charts';

import {
EuiBadge,
Expand Down Expand Up @@ -113,7 +121,11 @@ export const PageReducerStream: FC = () => {
<EuiSpacer />
<div style={{ height: '300px' }}>
<Chart>
<Settings rotation={90} />
<Settings
// TODO connect to charts.theme service see src/plugins/charts/public/services/theme/README.md
baseTheme={LEGACY_LIGHT_THEME}
rotation={90}
/>
<Axis id="entities" position={Position.Bottom} title="Commits" showOverlappingTicks />
<Axis id="left2" title="Developers" position={Position.Left} />

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
"@dnd-kit/utilities": "^2.0.0",
"@elastic/apm-rum": "^5.15.0",
"@elastic/apm-rum-react": "^2.0.1",
"@elastic/charts": "60.0.1",
"@elastic/charts": "61.0.3",
"@elastic/datemath": "5.0.3",
"@elastic/elasticsearch": "npm:@elastic/[email protected]",
"@elastic/ems-client": "8.5.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import {
Settings,
TooltipType,
Tooltip,
PartialTheme,
} from '@elastic/charts';
import { i18n } from '@kbn/i18n';
import { buildEsQuery, Query, Filter, AggregateQuery } from '@kbn/es-query';
Expand Down Expand Up @@ -223,22 +224,18 @@ const FieldStatsComponent: React.FC<FieldStatsProps> = ({
};
}, []);

const chartTheme = charts.theme.useChartsTheme();
const chartBaseTheme = charts.theme.useChartsBaseTheme();
const customChartTheme: typeof chartTheme = useMemo(() => {
const chartThemeOverrides = useMemo<PartialTheme>(() => {
return color
? {
...chartTheme,
barSeriesStyle: {
...chartTheme.barSeriesStyle,
rect: {
...(chartTheme.barSeriesStyle?.rect || {}),
fill: color,
},
},
}
: chartTheme;
}, [chartTheme, color]);
: {};
}, [color]);

const {
isLoading,
Expand Down Expand Up @@ -486,7 +483,7 @@ const FieldStatsComponent: React.FC<FieldStatsProps> = ({
<Tooltip type={TooltipType.None} />
<Settings
locale={i18n.getLocale()}
theme={customChartTheme}
theme={chartThemeOverrides}
baseTheme={chartBaseTheme}
xDomain={
fromDateParsed && toDateParsed
Expand Down Expand Up @@ -538,7 +535,7 @@ const FieldStatsComponent: React.FC<FieldStatsProps> = ({
<Settings
locale={i18n.getLocale()}
rotation={90}
theme={customChartTheme}
theme={chartThemeOverrides}
baseTheme={chartBaseTheme}
/>

Expand Down
Loading
Loading