[7.x] [TSVB] Add domain fit option to 0 opacity tsvb line charts (#54314) (#54402)

* [TSVB] Add domain fit option to 0 opacity tsvb line charts (#54314)

- Line charts is TSVB will no again fit to the data and provide a padding when away from the zero baseline

* remove erroneous @elastic/apm-rum dependency
This commit is contained in:
Nick Partridge 2020-01-10 08:47:39 -06:00 committed by GitHub
parent 5bdf771573
commit b57d6b738c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 5 deletions

View file

@ -111,7 +111,7 @@
"dependencies": {
"@babel/core": "^7.5.5",
"@babel/register": "^7.7.0",
"@elastic/charts": "^16.0.2",
"@elastic/charts": "^16.1.0",
"@elastic/datemath": "5.0.2",
"@elastic/ems-client": "1.0.5",
"@elastic/eui": "17.3.1",

View file

@ -79,10 +79,14 @@ export class TimeseriesVisualization extends Component {
static getYAxisDomain = model => {
const axisMin = get(model, 'axis_min', '').toString();
const axisMax = get(model, 'axis_max', '').toString();
const fit = model.series
? model.series.filter(({ hidden }) => !hidden).every(({ fill }) => fill === '0')
: model.fill === '0';
return {
min: axisMin.length ? Number(axisMin) : undefined,
max: axisMax.length ? Number(axisMax) : undefined,
fit,
};
};

View file

@ -1869,10 +1869,10 @@
debug "^3.1.0"
lodash.once "^4.1.1"
"@elastic/charts@^16.0.2":
version "16.0.2"
resolved "https://registry.yarnpkg.com/@elastic/charts/-/charts-16.0.2.tgz#35068a08a19534da62e9bcad700cc7b2a15bc55a"
integrity sha512-0tVyltAmAPOAfiRU1iKYk3b9++4oTn6IXvyM4SSj7Ukh5Y90XXmOtGEUPnZTiRPmup9MJi4srrm9ra9k/Kq4UQ==
"@elastic/charts@^16.1.0":
version "16.1.0"
resolved "https://registry.yarnpkg.com/@elastic/charts/-/charts-16.1.0.tgz#67cf11625dcd7e1c2cf16ef53349e6a68a73f5b1"
integrity sha512-0jZ7thhGmYC0ZdEVkxfg6M66epCD7k7BfYIi12FnrmIK+mUD2IPhR8b2TJXvaojPryN4YTNreGRncQ9R58fOoQ==
dependencies:
"@types/d3-shape" "^1.3.1"
classnames "^2.2.6"