mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
# Backport This will backport the following commits from `main` to `8.x`: - [[Lens] fit line charts by default (#196184)](https://github.com/elastic/kibana/pull/196184) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Marco Vettorello","email":"marco.vettorello@elastic.co"},"sourceCommit":{"committedDate":"2024-10-21T13:05:02Z","message":"[Lens] fit line charts by default (#196184)\n\n## Summary\r\n\r\nEvery line charts are now interpolated by default with a linear\r\ninterpolation.\r\n\r\nSolves the second task of\r\n[#186076](https://github.com/elastic/kibana/issues/186076)\r\n\r\nfix [#186076](https://github.com/elastic/kibana/issues/186076)\r\n\r\nbefore:\r\n<img width=\"816\" alt=\"Screenshot 2024-10-17 at 16 25 47\"\r\nsrc=\"https://github.com/user-attachments/assets/3b14c80b-deef-4d8d-9d5b-e118619e31cb\">\r\n\r\n\r\nafter:\r\n<img width=\"814\" alt=\"Screenshot 2024-10-17 at 16 25 56\"\r\nsrc=\"https://github.com/user-attachments/assets/45788530-aeb6-4851-ac1e-c53efcd73068\">\r\n\r\n## Release note\r\nNewly and default configured Lens line charts are now interpolated by\r\ndefault with a straight Linear interpolation.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by: Marta Bondyra <4283304+mbondyra@users.noreply.github.com>","sha":"5fe8aad89d59726060ba860d2f0692ddb3ca5ffa","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","enhancement","Feature:Lens","v9.0.0","apm:review","backport:version","v8.17.0"],"title":"[Lens] fit line charts by default","number":196184,"url":"https://github.com/elastic/kibana/pull/196184","mergeCommit":{"message":"[Lens] fit line charts by default (#196184)\n\n## Summary\r\n\r\nEvery line charts are now interpolated by default with a linear\r\ninterpolation.\r\n\r\nSolves the second task of\r\n[#186076](https://github.com/elastic/kibana/issues/186076)\r\n\r\nfix [#186076](https://github.com/elastic/kibana/issues/186076)\r\n\r\nbefore:\r\n<img width=\"816\" alt=\"Screenshot 2024-10-17 at 16 25 47\"\r\nsrc=\"https://github.com/user-attachments/assets/3b14c80b-deef-4d8d-9d5b-e118619e31cb\">\r\n\r\n\r\nafter:\r\n<img width=\"814\" alt=\"Screenshot 2024-10-17 at 16 25 56\"\r\nsrc=\"https://github.com/user-attachments/assets/45788530-aeb6-4851-ac1e-c53efcd73068\">\r\n\r\n## Release note\r\nNewly and default configured Lens line charts are now interpolated by\r\ndefault with a straight Linear interpolation.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by: Marta Bondyra <4283304+mbondyra@users.noreply.github.com>","sha":"5fe8aad89d59726060ba860d2f0692ddb3ca5ffa"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/196184","number":196184,"mergeCommit":{"message":"[Lens] fit line charts by default (#196184)\n\n## Summary\r\n\r\nEvery line charts are now interpolated by default with a linear\r\ninterpolation.\r\n\r\nSolves the second task of\r\n[#186076](https://github.com/elastic/kibana/issues/186076)\r\n\r\nfix [#186076](https://github.com/elastic/kibana/issues/186076)\r\n\r\nbefore:\r\n<img width=\"816\" alt=\"Screenshot 2024-10-17 at 16 25 47\"\r\nsrc=\"https://github.com/user-attachments/assets/3b14c80b-deef-4d8d-9d5b-e118619e31cb\">\r\n\r\n\r\nafter:\r\n<img width=\"814\" alt=\"Screenshot 2024-10-17 at 16 25 56\"\r\nsrc=\"https://github.com/user-attachments/assets/45788530-aeb6-4851-ac1e-c53efcd73068\">\r\n\r\n## Release note\r\nNewly and default configured Lens line charts are now interpolated by\r\ndefault with a straight Linear interpolation.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by: Marta Bondyra <4283304+mbondyra@users.noreply.github.com>","sha":"5fe8aad89d59726060ba860d2f0692ddb3ca5ffa"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Marco Vettorello <marco.vettorello@elastic.co>
This commit is contained in:
parent
f25c12b8c7
commit
b09f5ab96f
13 changed files with 61 additions and 68 deletions
|
@ -46,7 +46,7 @@ Understanding `LensXYConfig` in detail
|
|||
### `emphasizeFitting`
|
||||
|
||||
- **Type:** `boolean`
|
||||
- **Description:** When set to true, emphasizes the fitting of lines to the data points in line charts, making trends and patterns more apparent.
|
||||
- **Description:** When set to true a straight line will be used between isolated points in a line chart, a dashed line will be used otherwise.
|
||||
|
||||
### `fittingFunction`
|
||||
|
||||
|
|
|
@ -143,8 +143,8 @@ test('generates xy chart config', async () => {
|
|||
"yLeft": true,
|
||||
"yRight": true,
|
||||
},
|
||||
"emphasizeFitting": false,
|
||||
"fittingFunction": "None",
|
||||
"emphasizeFitting": true,
|
||||
"fittingFunction": "Linear",
|
||||
"gridlinesVisibilitySettings": Object {
|
||||
"x": true,
|
||||
"yLeft": true,
|
||||
|
|
|
@ -51,8 +51,8 @@ function buildVisualizationState(config: LensXYConfig): XYState {
|
|||
hideEndzones: true,
|
||||
preferredSeriesType: 'line',
|
||||
valueLabels: 'hide',
|
||||
emphasizeFitting: config?.emphasizeFitting ?? false,
|
||||
fittingFunction: config?.fittingFunction ?? 'None',
|
||||
emphasizeFitting: config?.emphasizeFitting ?? true,
|
||||
fittingFunction: config?.fittingFunction ?? 'Linear',
|
||||
yLeftExtent: {
|
||||
mode: config.yBounds?.mode ?? 'full',
|
||||
lowerBound: config.yBounds?.lowerBound,
|
||||
|
|
|
@ -40,7 +40,7 @@ export const commonXYArgs: CommonXYFn['args'] = {
|
|||
},
|
||||
emphasizeFitting: {
|
||||
types: ['boolean'],
|
||||
default: false,
|
||||
default: true,
|
||||
help: '',
|
||||
},
|
||||
valueLabels: {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
export const PLUGIN_ID = 'expressionXy';
|
||||
export const PLUGIN_NAME = 'expressionXy';
|
||||
|
||||
export { LayerTypes, XYCurveTypes } from './constants';
|
||||
export { LayerTypes, XYCurveTypes, FittingFunctions } from './constants';
|
||||
|
||||
export type {
|
||||
AllowedXYOverrides,
|
||||
|
|
|
@ -100,7 +100,6 @@ type GetColorFn = (
|
|||
type GetPointConfigFn = (config: {
|
||||
xAccessor: string | undefined;
|
||||
markSizeAccessor: string | undefined;
|
||||
emphasizeFitting?: boolean;
|
||||
showPoints?: boolean;
|
||||
pointsRadius?: number;
|
||||
}) => Partial<AreaSeriesStyle['point']>;
|
||||
|
@ -297,18 +296,10 @@ export const getSeriesName: GetSeriesNameFn = (
|
|||
return splitValues.length > 0 ? splitValues.join(' - ') : yAccessorTitle;
|
||||
};
|
||||
|
||||
const getPointConfig: GetPointConfigFn = ({
|
||||
xAccessor,
|
||||
markSizeAccessor,
|
||||
emphasizeFitting,
|
||||
showPoints,
|
||||
pointsRadius,
|
||||
}) => {
|
||||
const getPointConfig: GetPointConfigFn = ({ markSizeAccessor, showPoints, pointsRadius }) => {
|
||||
return {
|
||||
visible: (showPoints !== undefined ? showPoints : !xAccessor || markSizeAccessor !== undefined)
|
||||
? 'always'
|
||||
: 'never',
|
||||
radius: pointsRadius !== undefined ? pointsRadius : xAccessor && !emphasizeFitting ? 5 : 0,
|
||||
visible: showPoints || markSizeAccessor ? 'always' : 'never',
|
||||
radius: pointsRadius,
|
||||
fill: markSizeAccessor ? ColorVariant.Series : undefined,
|
||||
};
|
||||
};
|
||||
|
@ -550,7 +541,6 @@ export const getSeriesProps: GetSeriesPropsFn = ({
|
|||
point: getPointConfig({
|
||||
xAccessor: xColumnId,
|
||||
markSizeAccessor: markSizeColumnId,
|
||||
emphasizeFitting,
|
||||
showPoints: layer.showPoints,
|
||||
pointsRadius: layer.pointsRadius,
|
||||
}),
|
||||
|
@ -567,7 +557,6 @@ export const getSeriesProps: GetSeriesPropsFn = ({
|
|||
point: getPointConfig({
|
||||
xAccessor: xColumnId,
|
||||
markSizeAccessor: markSizeColumnId,
|
||||
emphasizeFitting,
|
||||
showPoints: layer.showPoints,
|
||||
pointsRadius: layer.pointsRadius,
|
||||
}),
|
||||
|
|
|
@ -15,6 +15,6 @@ export function plugin() {
|
|||
return new ExpressionXyPlugin();
|
||||
}
|
||||
|
||||
export { LayerTypes, XYCurveTypes } from '../common';
|
||||
export { LayerTypes, XYCurveTypes, FittingFunctions } from '../common';
|
||||
|
||||
export type { ExpressionXyPluginSetup, ExpressionXyPluginStart } from './types';
|
||||
|
|
|
@ -121,31 +121,30 @@ describe('#toExpression', () => {
|
|||
).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('should default the fitting function to None', () => {
|
||||
expect(
|
||||
(
|
||||
xyVisualization.toExpression(
|
||||
it('should default the fitting function to Linear', () => {
|
||||
const ast = xyVisualization.toExpression(
|
||||
{
|
||||
legend: { position: Position.Bottom, isVisible: true },
|
||||
valueLabels: 'hide',
|
||||
preferredSeriesType: 'bar',
|
||||
layers: [
|
||||
{
|
||||
legend: { position: Position.Bottom, isVisible: true },
|
||||
valueLabels: 'hide',
|
||||
preferredSeriesType: 'bar',
|
||||
layers: [
|
||||
{
|
||||
layerId: 'first',
|
||||
layerType: LayerTypes.DATA,
|
||||
seriesType: 'area',
|
||||
splitAccessor: 'd',
|
||||
xAccessor: 'a',
|
||||
accessors: ['b', 'c'],
|
||||
},
|
||||
],
|
||||
layerId: 'first',
|
||||
layerType: LayerTypes.DATA,
|
||||
seriesType: 'area',
|
||||
splitAccessor: 'd',
|
||||
xAccessor: 'a',
|
||||
accessors: ['b', 'c'],
|
||||
},
|
||||
frame.datasourceLayers,
|
||||
undefined,
|
||||
datasourceExpressionsByLayers
|
||||
) as Ast
|
||||
).chain[0].arguments.fittingFunction[0]
|
||||
).toEqual('None');
|
||||
],
|
||||
},
|
||||
frame.datasourceLayers,
|
||||
undefined,
|
||||
datasourceExpressionsByLayers
|
||||
) as Ast;
|
||||
|
||||
expect(ast.chain[0].arguments.fittingFunction[0]).toEqual('Linear');
|
||||
expect(ast.chain[0].arguments.emphasizeFitting[0]).toEqual(true);
|
||||
});
|
||||
|
||||
it('should default the axisTitles visibility settings to true', () => {
|
||||
|
|
|
@ -35,6 +35,8 @@ import {
|
|||
XYCurveType,
|
||||
YAxisConfigFn,
|
||||
} from '@kbn/expression-xy-plugin/common';
|
||||
|
||||
import { FittingFunctions } from '@kbn/expression-xy-plugin/public';
|
||||
import type { EventAnnotationConfig } from '@kbn/event-annotation-common';
|
||||
import { LayerTypes } from '@kbn/expression-xy-plugin/public';
|
||||
import { SystemPaletteExpressionFunctionDefinition } from '@kbn/charts-plugin/common';
|
||||
|
@ -336,9 +338,9 @@ export const buildXYExpression = (
|
|||
|
||||
const layeredXyVisFn = buildExpressionFunction<LayeredXyVisFn>('layeredXyVis', {
|
||||
legend: buildExpression([legendConfigFn]).toAst(),
|
||||
fittingFunction: state.fittingFunction ?? 'None',
|
||||
fittingFunction: state.fittingFunction ?? FittingFunctions.LINEAR,
|
||||
endValue: state.endValue ?? 'None',
|
||||
emphasizeFitting: state.emphasizeFitting ?? false,
|
||||
emphasizeFitting: state.emphasizeFitting ?? true,
|
||||
minBarHeight: state.minBarHeight ?? 1,
|
||||
fillOpacity: state.fillOpacity ?? 0.3,
|
||||
valueLabels: state.valueLabels ?? 'hide',
|
||||
|
|
|
@ -7,10 +7,11 @@
|
|||
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import type { FittingFunction } from '@kbn/expression-xy-plugin/common';
|
||||
import { FittingFunctions } from '@kbn/expression-xy-plugin/public';
|
||||
|
||||
export const fittingFunctionDefinitions: Array<{ id: FittingFunction } & Record<string, string>> = [
|
||||
{
|
||||
id: 'None',
|
||||
id: FittingFunctions.NONE,
|
||||
title: i18n.translate('xpack.lens.fittingFunctionsTitle.none', {
|
||||
defaultMessage: 'Hide',
|
||||
}),
|
||||
|
@ -19,7 +20,7 @@ export const fittingFunctionDefinitions: Array<{ id: FittingFunction } & Record<
|
|||
}),
|
||||
},
|
||||
{
|
||||
id: 'Zero',
|
||||
id: FittingFunctions.ZERO,
|
||||
title: i18n.translate('xpack.lens.fittingFunctionsTitle.zero', {
|
||||
defaultMessage: 'Zero',
|
||||
}),
|
||||
|
@ -28,7 +29,7 @@ export const fittingFunctionDefinitions: Array<{ id: FittingFunction } & Record<
|
|||
}),
|
||||
},
|
||||
{
|
||||
id: 'Linear',
|
||||
id: FittingFunctions.LINEAR,
|
||||
title: i18n.translate('xpack.lens.fittingFunctionsTitle.linear', {
|
||||
defaultMessage: 'Linear',
|
||||
}),
|
||||
|
@ -37,7 +38,7 @@ export const fittingFunctionDefinitions: Array<{ id: FittingFunction } & Record<
|
|||
}),
|
||||
},
|
||||
{
|
||||
id: 'Carry',
|
||||
id: FittingFunctions.CARRY,
|
||||
title: i18n.translate('xpack.lens.fittingFunctionsTitle.carry', {
|
||||
defaultMessage: 'Last',
|
||||
}),
|
||||
|
@ -46,7 +47,7 @@ export const fittingFunctionDefinitions: Array<{ id: FittingFunction } & Record<
|
|||
}),
|
||||
},
|
||||
{
|
||||
id: 'Lookahead',
|
||||
id: FittingFunctions.LOOKAHEAD,
|
||||
title: i18n.translate('xpack.lens.fittingFunctionsTitle.lookahead', {
|
||||
defaultMessage: 'Next',
|
||||
}),
|
||||
|
|
|
@ -9,6 +9,7 @@ import React from 'react';
|
|||
import { i18n } from '@kbn/i18n';
|
||||
import { EuiFormRow, EuiIconTip, EuiSuperSelect, EuiSwitch, EuiText } from '@elastic/eui';
|
||||
import type { FittingFunction, EndValue } from '@kbn/expression-xy-plugin/common';
|
||||
import { FittingFunctions } from '@kbn/expression-xy-plugin/public';
|
||||
import { fittingFunctionDefinitions } from './fitting_function_definitions';
|
||||
import { endValueDefinitions } from './end_value_definitions';
|
||||
|
||||
|
@ -25,7 +26,7 @@ export interface MissingValuesOptionProps {
|
|||
export const MissingValuesOptions: React.FC<MissingValuesOptionProps> = ({
|
||||
onFittingFnChange,
|
||||
fittingFunction,
|
||||
emphasizeFitting,
|
||||
emphasizeFitting = true,
|
||||
onEmphasizeFittingChange,
|
||||
onEndValueChange,
|
||||
endValue,
|
||||
|
@ -78,13 +79,13 @@ export const MissingValuesOptions: React.FC<MissingValuesOptionProps> = ({
|
|||
inputDisplay: title,
|
||||
};
|
||||
})}
|
||||
valueOfSelected={fittingFunction || 'None'}
|
||||
valueOfSelected={fittingFunction || FittingFunctions.LINEAR}
|
||||
onChange={(value) => onFittingFnChange(value)}
|
||||
itemLayoutAlign="top"
|
||||
hasDividers
|
||||
/>
|
||||
</EuiFormRow>
|
||||
{fittingFunction && fittingFunction !== 'None' && (
|
||||
{fittingFunction && fittingFunction !== FittingFunctions.NONE && (
|
||||
<>
|
||||
<EuiFormRow
|
||||
display="columnCompressed"
|
||||
|
@ -109,7 +110,7 @@ export const MissingValuesOptions: React.FC<MissingValuesOptionProps> = ({
|
|||
inputDisplay: title,
|
||||
};
|
||||
})}
|
||||
valueOfSelected={endValue || 'None'}
|
||||
valueOfSelected={endValue || FittingFunctions.NONE}
|
||||
onChange={(value) => onEndValueChange(value)}
|
||||
itemLayoutAlign="top"
|
||||
hasDividers
|
||||
|
|
|
@ -633,7 +633,7 @@ describe('xy_suggestions', () => {
|
|||
legend: { isVisible: true, position: 'bottom' },
|
||||
valueLabels: 'hide',
|
||||
preferredSeriesType: 'bar',
|
||||
fittingFunction: 'None',
|
||||
fittingFunction: 'Linear',
|
||||
layers: [
|
||||
{
|
||||
accessors: ['price'],
|
||||
|
@ -691,7 +691,7 @@ describe('xy_suggestions', () => {
|
|||
legend: { isVisible: true, position: 'bottom' },
|
||||
valueLabels: 'hide',
|
||||
preferredSeriesType: 'bar',
|
||||
fittingFunction: 'None',
|
||||
fittingFunction: 'Linear',
|
||||
layers: [
|
||||
{
|
||||
layerId: 'first',
|
||||
|
@ -823,7 +823,7 @@ describe('xy_suggestions', () => {
|
|||
const currentState: XYState = {
|
||||
legend: { isVisible: true, position: 'bottom' },
|
||||
valueLabels: 'hide',
|
||||
fittingFunction: 'None',
|
||||
fittingFunction: 'Linear',
|
||||
preferredSeriesType: 'line',
|
||||
layers: [
|
||||
{
|
||||
|
@ -858,7 +858,7 @@ describe('xy_suggestions', () => {
|
|||
const currentState: XYState = {
|
||||
legend: { isVisible: true, position: 'bottom' },
|
||||
valueLabels: 'hide',
|
||||
fittingFunction: 'None',
|
||||
fittingFunction: 'Linear',
|
||||
axisTitlesVisibilitySettings: { x: true, yLeft: true, yRight: true },
|
||||
gridlinesVisibilitySettings: { x: true, yLeft: true, yRight: true },
|
||||
tickLabelsVisibilitySettings: { x: true, yLeft: false, yRight: false },
|
||||
|
@ -908,7 +908,7 @@ describe('xy_suggestions', () => {
|
|||
legend: { isVisible: true, position: 'bottom' },
|
||||
valueLabels: 'hide',
|
||||
preferredSeriesType: 'bar',
|
||||
fittingFunction: 'None',
|
||||
fittingFunction: 'Linear',
|
||||
axisTitlesVisibilitySettings: { x: true, yLeft: true, yRight: true },
|
||||
gridlinesVisibilitySettings: { x: true, yLeft: true, yRight: true },
|
||||
tickLabelsVisibilitySettings: { x: true, yLeft: false, yRight: false },
|
||||
|
@ -967,7 +967,7 @@ describe('xy_suggestions', () => {
|
|||
const currentState: XYState = {
|
||||
legend: { isVisible: true, position: 'bottom' },
|
||||
valueLabels: 'hide',
|
||||
fittingFunction: 'None',
|
||||
fittingFunction: 'Linear',
|
||||
preferredSeriesType: 'bar',
|
||||
layers: [
|
||||
{
|
||||
|
@ -1006,7 +1006,7 @@ describe('xy_suggestions', () => {
|
|||
legend: { isVisible: true, position: 'bottom' },
|
||||
valueLabels: 'hide',
|
||||
preferredSeriesType: 'bar',
|
||||
fittingFunction: 'None',
|
||||
fittingFunction: 'Linear',
|
||||
layers: [
|
||||
{
|
||||
accessors: ['price'],
|
||||
|
@ -1043,7 +1043,7 @@ describe('xy_suggestions', () => {
|
|||
legend: { isVisible: true, position: 'bottom' },
|
||||
valueLabels: 'hide',
|
||||
preferredSeriesType: 'bar',
|
||||
fittingFunction: 'None',
|
||||
fittingFunction: 'Linear',
|
||||
axisTitlesVisibilitySettings: { x: true, yLeft: true, yRight: true },
|
||||
gridlinesVisibilitySettings: { x: true, yLeft: true, yRight: true },
|
||||
tickLabelsVisibilitySettings: { x: true, yLeft: false, yRight: false },
|
||||
|
@ -1089,7 +1089,7 @@ describe('xy_suggestions', () => {
|
|||
legend: { isVisible: true, position: 'bottom' },
|
||||
valueLabels: 'hide',
|
||||
preferredSeriesType: 'bar',
|
||||
fittingFunction: 'None',
|
||||
fittingFunction: 'Linear',
|
||||
axisTitlesVisibilitySettings: { x: true, yLeft: true, yRight: true },
|
||||
gridlinesVisibilitySettings: { x: true, yLeft: true, yRight: true },
|
||||
tickLabelsVisibilitySettings: { x: true, yLeft: false, yRight: false },
|
||||
|
@ -1136,7 +1136,7 @@ describe('xy_suggestions', () => {
|
|||
legend: { isVisible: true, position: 'bottom' },
|
||||
valueLabels: 'hide',
|
||||
preferredSeriesType: 'bar',
|
||||
fittingFunction: 'None',
|
||||
fittingFunction: 'Linear',
|
||||
axisTitlesVisibilitySettings: { x: true, yLeft: true, yRight: true },
|
||||
gridlinesVisibilitySettings: { x: true, yLeft: true, yRight: true },
|
||||
tickLabelsVisibilitySettings: { x: true, yLeft: false, yRight: false },
|
||||
|
|
|
@ -8,7 +8,8 @@
|
|||
import { i18n } from '@kbn/i18n';
|
||||
import { partition } from 'lodash';
|
||||
import { Position } from '@elastic/charts';
|
||||
import { LayerTypes } from '@kbn/expression-xy-plugin/public';
|
||||
import { FittingFunctions, LayerTypes } from '@kbn/expression-xy-plugin/public';
|
||||
|
||||
import type {
|
||||
SuggestionRequest,
|
||||
VisualizationSuggestion,
|
||||
|
@ -573,7 +574,7 @@ function buildSuggestion({
|
|||
const state: State = {
|
||||
legend: currentState ? currentState.legend : { isVisible: true, position: Position.Right },
|
||||
valueLabels: currentState?.valueLabels || 'hide',
|
||||
fittingFunction: currentState?.fittingFunction || 'None',
|
||||
fittingFunction: currentState?.fittingFunction ?? FittingFunctions.LINEAR,
|
||||
curveType: currentState?.curveType,
|
||||
fillOpacity: currentState?.fillOpacity,
|
||||
xTitle: currentState?.xTitle,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue