forked from opensearch-project/OpenSearch-Dashboards
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: path of stacked area series with missing values (opensearch-proj…
- Loading branch information
1 parent
4b67846
commit 93f063f
Showing
6 changed files
with
133 additions
and
3 deletions.
There are no files selected for viewing
Binary file added
BIN
+31.4 KB
...s-area-chart-test-stacked-with-missing-values-visually-looks-correct-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-3.67 KB
(87%)
...isual-tests-for-all-stories-axes-custom-mixed-visually-looks-correct-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-3.68 KB
(86%)
...s-stories-test-ts-axis-stories-should-render-with-domain-constraints-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
128 changes: 128 additions & 0 deletions
128
packages/osd-charts/stories/area/16_test_stacked_with_missing.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
import React from 'react'; | ||
|
||
import { Chart, CurveType, AreaSeries, Position, Axis, ScaleType } from '../../src'; | ||
|
||
export const Example = () => ( | ||
<Chart className="story-chart"> | ||
<Axis id="bottom" position={Position.Bottom} /> | ||
<Axis id="left" position={Position.Left} /> | ||
<AreaSeries | ||
id="path-order" | ||
xScaleType={ScaleType.Ordinal} | ||
yScaleType={ScaleType.Linear} | ||
xAccessor="col-0-3" | ||
yAccessors={['col-2-5']} | ||
data={data} | ||
curve={CurveType.CURVE_CATMULL_ROM} | ||
splitSeriesAccessors={['col-1-6']} | ||
stackAccessors={['col-1-6']} | ||
/> | ||
</Chart> | ||
); | ||
|
||
const data = [ | ||
{ | ||
'col-0-3': 'ZRH', | ||
'col-1-6': 'Logstash Airways', | ||
'col-2-5': 27, | ||
}, | ||
{ | ||
'col-0-3': 'ZRH', | ||
'col-1-6': 'Kibana Airlines', | ||
'col-2-5': 38, | ||
}, | ||
{ | ||
'col-0-3': 'ZRH', | ||
'col-1-6': 'JetBeats', | ||
'col-2-5': 26, | ||
}, | ||
{ | ||
'col-0-3': 'ZRH', | ||
'col-1-6': 'ES-Air', | ||
'col-2-5': 33, | ||
}, | ||
{ | ||
'col-0-3': 'YYZ', | ||
'col-1-6': 'Kibana Airlines', | ||
'col-2-5': 5, | ||
}, | ||
{ | ||
'col-0-3': 'YYZ', | ||
'col-1-6': 'JetBeats', | ||
'col-2-5': 7, | ||
}, | ||
{ | ||
'col-0-3': 'YYZ', | ||
'col-1-6': 'ES-Air', | ||
'col-2-5': 4, | ||
}, | ||
{ | ||
'col-0-3': 'YWG', | ||
'col-1-6': 'Logstash Airways', | ||
'col-2-5': 17, | ||
}, | ||
{ | ||
'col-0-3': 'YWG', | ||
'col-1-6': 'Kibana Airlines', | ||
'col-2-5': 19, | ||
}, | ||
{ | ||
'col-0-3': 'YWG', | ||
'col-1-6': 'JetBeats', | ||
'col-2-5': 17, | ||
}, | ||
{ | ||
'col-0-3': 'YUL', | ||
'col-1-6': 'Logstash Airways', | ||
'col-2-5': 4, | ||
}, | ||
{ | ||
'col-0-3': 'YUL', | ||
'col-1-6': 'Kibana Airlines', | ||
'col-2-5': 7, | ||
}, | ||
{ | ||
'col-0-3': 'YUL', | ||
'col-1-6': 'JetBeats', | ||
'col-2-5': 4, | ||
}, | ||
{ | ||
'col-0-3': 'YUL', | ||
'col-1-6': 'ES-Air', | ||
'col-2-5': 13, | ||
}, | ||
{ | ||
'col-0-3': 'YOW', | ||
'col-1-6': 'Logstash Airways', | ||
'col-2-5': 11, | ||
}, | ||
{ | ||
'col-0-3': 'YOW', | ||
'col-1-6': 'Kibana Airlines', | ||
'col-2-5': 6, | ||
}, | ||
{ | ||
'col-0-3': 'YOW', | ||
'col-1-6': 'ES-Air', | ||
'col-2-5': 14, | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters