mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[charts] Fix timezone regression in charts (#123663)
This commit is contained in:
parent
2325ed6a22
commit
676b061ad8
11 changed files with 13 additions and 1 deletions
|
@ -117,6 +117,7 @@ export function PageViewsChart({ data, loading }: Props) {
|
|||
labelFormat={(d) => numeral(d).format('0a')}
|
||||
/>
|
||||
<BarSeries
|
||||
timeZone="local"
|
||||
id={I18LABELS.pageViews}
|
||||
xScaleType={ScaleType.Time}
|
||||
yScaleType={ScaleType.Linear}
|
||||
|
|
|
@ -94,6 +94,7 @@ export function ServiceProfilingTimeline({
|
|||
{specs.map((spec) => (
|
||||
<BarSeries
|
||||
{...spec}
|
||||
timeZone="local"
|
||||
key={spec.id}
|
||||
xScaleType={ScaleType.Time}
|
||||
yScaleType={ScaleType.Linear}
|
||||
|
|
|
@ -106,6 +106,7 @@ export function SparkPlot({
|
|||
xAccessor={'x'}
|
||||
yAccessors={['y']}
|
||||
data={series}
|
||||
timeZone="local"
|
||||
color={colorValue}
|
||||
curve={CurveType.CURVE_MONOTONE_X}
|
||||
/>
|
||||
|
@ -117,6 +118,7 @@ export function SparkPlot({
|
|||
xAccessor={'x'}
|
||||
yAccessors={['y']}
|
||||
data={comparisonSeries}
|
||||
timeZone="local"
|
||||
color={theme.eui.euiColorLightestShade}
|
||||
curve={CurveType.CURVE_MONOTONE_X}
|
||||
/>
|
||||
|
|
|
@ -138,6 +138,7 @@ export const DocumentCountChart: FC<Props> = ({
|
|||
xAccessor="time"
|
||||
yAccessors={['value']}
|
||||
data={adjustedChartPoints}
|
||||
timeZone="local"
|
||||
/>
|
||||
</Chart>
|
||||
</div>
|
||||
|
|
|
@ -442,6 +442,7 @@ export const DatafeedChartFlyout: FC<DatafeedChartFlyoutProps> = ({ jobId, end,
|
|||
yAccessors={[1]}
|
||||
data={sourceData}
|
||||
curve={CurveType.LINEAR}
|
||||
timeZone="local"
|
||||
/>
|
||||
<LineSeries
|
||||
key={'job-results'}
|
||||
|
@ -455,6 +456,7 @@ export const DatafeedChartFlyout: FC<DatafeedChartFlyoutProps> = ({ jobId, end,
|
|||
yAccessors={[1]}
|
||||
data={bucketData}
|
||||
curve={CurveType.LINEAR}
|
||||
timeZone="local"
|
||||
/>
|
||||
</Chart>
|
||||
</div>
|
||||
|
|
|
@ -44,6 +44,7 @@ export const ModelBounds: FC<Props> = ({ modelData }) => {
|
|||
curve={CurveType.CURVE_MONOTONE_X}
|
||||
areaSeriesStyle={areaSeriesStyle}
|
||||
color={MODEL_COLOR}
|
||||
timeZone="local"
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -90,6 +90,7 @@ export const EventRateChart: FC<Props> = ({
|
|||
yAccessors={['value']}
|
||||
data={eventRateChartData}
|
||||
color={barColor}
|
||||
timeZone="local"
|
||||
/>
|
||||
</Chart>
|
||||
</LoadingWrapper>
|
||||
|
|
|
@ -142,6 +142,7 @@ export function APMSection({ bucketSize }: Props) {
|
|||
xAccessor={'x'}
|
||||
yAccessors={['y']}
|
||||
color={transactionsColor}
|
||||
timeZone="local"
|
||||
/>
|
||||
<Axis
|
||||
id="y-axis"
|
||||
|
|
|
@ -53,6 +53,7 @@ export function MetricWithSparkline({ id, formatter, value, timeseries, color }:
|
|||
xAccessor={'timestamp'}
|
||||
yAccessors={[id]}
|
||||
color={colors[color] || '#006BB4'}
|
||||
timeZone="local"
|
||||
/>
|
||||
</Chart>
|
||||
</EuiFlexItem>
|
||||
|
|
|
@ -99,6 +99,7 @@ export const AlertsHistogram = React.memo<AlertsHistogramProps>(
|
|||
yAccessors={yAccessors}
|
||||
splitSeriesAccessors={splitSeriesAccessors}
|
||||
data={data}
|
||||
timeZone={'local'}
|
||||
/>
|
||||
</Chart>
|
||||
</EuiFlexItem>
|
||||
|
|
|
@ -23,6 +23,7 @@ export const DurationLineSeriesList = ({ monitorType, lines }: Props) => (
|
|||
curve={CurveType.CURVE_MONOTONE_X}
|
||||
// this id is used for the line chart representing the average duration length
|
||||
data={line.map(({ x, y }) => [x, y || null])}
|
||||
timeZone="local"
|
||||
id={`loc-avg-${name}`}
|
||||
key={`loc-line-${name}`}
|
||||
name={name}
|
||||
|
@ -31,7 +32,6 @@ export const DurationLineSeriesList = ({ monitorType, lines }: Props) => (
|
|||
yAccessors={[1]}
|
||||
yScaleType={ScaleType.Linear}
|
||||
fit={Fit.Linear}
|
||||
timeZone="local"
|
||||
tickFormat={(d) =>
|
||||
monitorType === 'browser'
|
||||
? `${microToSec(d)} ${SEC_LABEL}`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue