Skip to content

Commit

Permalink
Deploying edbff68 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
elastic-datavis[bot] committed Mar 12, 2024
1 parent a914b3d commit 5b6e0fe
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 17 deletions.
2 changes: 1 addition & 1 deletion iframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,4 @@



window['FEATURES'] = {"postcss":true};</script><script src="runtime~main.c950fcde.iframe.bundle.js"></script><script src="vendors~main.c0e51da1.iframe.bundle.js"></script><script src="main.417aecd6.iframe.bundle.js"></script></body></html>
window['FEATURES'] = {"postcss":true};</script><script src="runtime~main.c950fcde.iframe.bundle.js"></script><script src="vendors~main.c0e51da1.iframe.bundle.js"></script><script src="main.c206cd9a.iframe.bundle.js"></script></body></html>
Original file line number Diff line number Diff line change
Expand Up @@ -5160,6 +5160,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }

__webpack_require__(/*! ../node_modules/core-js/modules/es.object.define-property.js */ "../node_modules/core-js/modules/es.object.define-property.js");

__webpack_require__(/*! ../node_modules/core-js/modules/es.array.slice.js */ "../node_modules/core-js/modules/es.array.slice.js");

__webpack_require__(/*! ../node_modules/core-js/modules/es.array.map.js */ "../node_modules/core-js/modules/es.array.map.js");

__webpack_require__(/*! ../node_modules/core-js/modules/es.array.for-each.js */ "../node_modules/core-js/modules/es.array.for-each.js");
Expand All @@ -5186,8 +5188,6 @@ __webpack_require__(/*! ../node_modules/core-js/modules/es.array.iterator.js */

__webpack_require__(/*! ../node_modules/core-js/modules/web.dom-collections.iterator.js */ "../node_modules/core-js/modules/web.dom-collections.iterator.js");

__webpack_require__(/*! ../node_modules/core-js/modules/es.array.slice.js */ "../node_modules/core-js/modules/es.array.slice.js");

__webpack_require__(/*! ../node_modules/core-js/modules/es.function.name.js */ "../node_modules/core-js/modules/es.function.name.js");

__webpack_require__(/*! ../node_modules/core-js/modules/es.array.from.js */ "../node_modules/core-js/modules/es.array.from.js");
Expand All @@ -5207,6 +5207,8 @@ var lines_1 = __webpack_require__(/*! ../../../../xy_chart/renderer/canvas/lines

var debug_1 = __webpack_require__(/*! ../../../../xy_chart/renderer/canvas/utils/debug */ "../packages/charts/src/chart_types/xy_chart/renderer/canvas/utils/debug.ts");

var spec_1 = __webpack_require__(/*! ../../../spec */ "../packages/charts/src/chart_types/bullet_graph/spec.ts");

var theme_1 = __webpack_require__(/*! ../../../theme */ "../packages/charts/src/chart_types/bullet_graph/theme.ts");

var angular_1 = __webpack_require__(/*! ../../../utils/angular */ "../packages/charts/src/chart_types/bullet_graph/utils/angular.ts");
Expand Down Expand Up @@ -5249,7 +5251,8 @@ function angularBullet(ctx, dimensions, style, backgroundColor, spec, debug, act
min = _ref3[0],
max = _ref3[1];

var formatterColorTicks = ticks.map(function (v) {
var filteredTicks = spec.subtype !== spec_1.BulletSubtype.circle ? ticks : min === ticks.at(0) && max === ticks.at(-1) ? ticks.slice(0, -1) : max === ticks.at(0) && min === ticks.at(-1) ? ticks.slice(1) : ticks;
var formatterColorTicks = filteredTicks.map(function (v) {
return {
value: v,
formattedValue: datum.tickFormatter(v)
Expand Down Expand Up @@ -6461,8 +6464,6 @@ __webpack_require__(/*! ../node_modules/core-js/modules/es.array.index-of.js */

__webpack_require__(/*! ../node_modules/core-js/modules/es.symbol.js */ "../node_modules/core-js/modules/es.symbol.js");

__webpack_require__(/*! ../node_modules/core-js/modules/es.array.is-array.js */ "../node_modules/core-js/modules/es.array.is-array.js");

__webpack_require__(/*! ../node_modules/core-js/modules/es.symbol.description.js */ "../node_modules/core-js/modules/es.symbol.description.js");

__webpack_require__(/*! ../node_modules/core-js/modules/es.object.to-string.js */ "../node_modules/core-js/modules/es.object.to-string.js");
Expand Down Expand Up @@ -6507,6 +6508,8 @@ __webpack_require__(/*! ../node_modules/core-js/modules/es.object.assign.js */ "

__webpack_require__(/*! ../node_modules/core-js/modules/es.array.filter.js */ "../node_modules/core-js/modules/es.array.filter.js");

__webpack_require__(/*! ../node_modules/core-js/modules/es.array.is-array.js */ "../node_modules/core-js/modules/es.array.is-array.js");

Object.defineProperty(exports, "__esModule", {
value: true
});
Expand Down Expand Up @@ -6703,7 +6706,7 @@ function getScaleWithTicks(domain, range, tickOptions) {
var updatedDomain = scale.domain();
return {
scale: scale,
ticks: customRange ? ticks(updatedDomain).filter((0, common_1.isWithinRange)(updatedDomain)) : scale.ticks(ticks)
ticks: customRange ? (Array.isArray(ticks) ? ticks : ticks(updatedDomain)).filter((0, common_1.isWithinRange)(updatedDomain)) : scale.ticks(ticks)
};
}

Expand Down Expand Up @@ -7726,6 +7729,8 @@ function getColorBands(scale, colorScale, ticks, baseDomain, _ref11) {

__webpack_require__(/*! ../node_modules/core-js/modules/es.object.define-property.js */ "../node_modules/core-js/modules/es.object.define-property.js");

__webpack_require__(/*! ../node_modules/core-js/modules/es.array.is-array.js */ "../node_modules/core-js/modules/es.array.is-array.js");

Object.defineProperty(exports, "__esModule", {
value: true
});
Expand All @@ -7740,7 +7745,11 @@ var constants_1 = __webpack_require__(/*! ../renderer/canvas/constants */ "../pa
function getTicks(length, _ref) {
var desiredTicks = _ref.desiredTicks,
interval = _ref.interval;
if ((0, common_1.isFiniteNumber)(desiredTicks) && desiredTicks > 0 || typeof desiredTicks === 'function') return desiredTicks;

if ((0, common_1.isFiniteNumber)(desiredTicks) && desiredTicks >= 0 || typeof desiredTicks === 'function' || Array.isArray(desiredTicks)) {
return desiredTicks;
}

var target = Math.floor(length / interval);
return (0, common_1.clamp)(target, constants_1.MIN_TICK_COUNT, constants_1.MAX_TICK_COUNT);
}
Expand Down Expand Up @@ -111470,7 +111479,7 @@ exports.Example = void 0;
// @ts-nocheck
// @ts-ignore

var __STORY__ = "/*\n * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one\n * or more contributor license agreements. Licensed under the Elastic License\n * 2.0 and the Server Side Public License, v 1; you may not use this file except\n * in compliance with, at your election, the Elastic License 2.0 or the Server\n * Side Public License, v 1.\n */\n\nimport { text, number, boolean } from '@storybook/addon-knobs';\nimport numeral from 'numeral';\nimport React from 'react';\n\nimport { Chart, Bullet, BulletSubtype, Settings } from '@elastic/charts';\n\nimport { ChartsStory } from '../../types';\nimport { useBaseTheme } from '../../use_base_theme';\nimport { getDebugStateLogger } from '../utils/debug_state_logger';\nimport { customKnobs } from '../utils/knobs';\nimport { getKnobFromEnum } from '../utils/knobs/utils';\n\nexport const Example: ChartsStory = (_, { title, description }) => {\n const debug = boolean('debug', false);\n const debugState = boolean('Enable debug state', false);\n const bulletTitle = text('title', 'Error rate', 'General');\n const subtitle = text('subtitle', '', 'General');\n const value = number('value', 56, { range: true, min: -200, max: 200 }, 'General');\n const target = number('target', 75, { range: true, min: -200, max: 200 }, 'General');\n const start = number('start', 0, { range: true, min: -200, max: 200 }, 'General');\n const end = number('end', 100, { range: true, min: -200, max: 200 }, 'General');\n const format = text('format (numeraljs)', '0.[0]', 'General');\n const formatter = (d: number) => numeral(d).format(format);\n const subtype = getKnobFromEnum('subtype', BulletSubtype, BulletSubtype.horizontal, { group: 'General' });\n\n const niceDomain = boolean('niceDomain', false, 'Ticks');\n const tickStrategy = customKnobs.multiSelect(\n 'tick strategy',\n {\n Auto: 'auto',\n TickCount: 'count',\n TickPlacements: 'placements',\n },\n 'auto',\n 'select',\n 'Ticks',\n );\n const ticks = number('ticks(approx. count)', 5, { min: 0, step: 1 }, 'Ticks');\n const tickPlacements = customKnobs.numbersArray(\n 'ticks(placements)',\n [-200, -100, 0, 5, 10, 15, 20, 25, 50, 100, 200],\n undefined,\n 'Ticks',\n );\n\n return (\n <Chart title={title} description={description}>\n <Settings\n debug={debug}\n onRenderChange={getDebugStateLogger(debugState)}\n debugState={debugState}\n baseTheme={useBaseTheme()}\n />\n <Bullet\n id=\"bullet\"\n subtype={subtype}\n data={[\n [\n {\n target,\n value,\n title: bulletTitle,\n subtitle,\n domain: [start, end],\n niceDomain,\n ticks:\n tickStrategy[0] === 'count'\n ? ticks\n : tickStrategy[0] === 'placements'\n ? () => tickPlacements\n : undefined,\n valueFormatter: formatter,\n tickFormatter: formatter,\n },\n ],\n ]}\n />\n </Chart>\n );\n};\n\nExample.parameters = {\n resize: {\n width: 500,\n height: 500,\n boxShadow: '5px 5px 15px 5px rgba(0,0,0,0.29)',\n borderRadius: '6px',\n },\n};\n"; // @ts-ignore
var __STORY__ = "/*\n * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one\n * or more contributor license agreements. Licensed under the Elastic License\n * 2.0 and the Server Side Public License, v 1; you may not use this file except\n * in compliance with, at your election, the Elastic License 2.0 or the Server\n * Side Public License, v 1.\n */\n\nimport { text, number, boolean } from '@storybook/addon-knobs';\nimport numeral from 'numeral';\nimport React from 'react';\n\nimport { Chart, Bullet, BulletSubtype, Settings } from '@elastic/charts';\n\nimport { ChartsStory } from '../../types';\nimport { useBaseTheme } from '../../use_base_theme';\nimport { getDebugStateLogger } from '../utils/debug_state_logger';\nimport { customKnobs } from '../utils/knobs';\nimport { getKnobFromEnum } from '../utils/knobs/utils';\n\nexport const Example: ChartsStory = (_, { title, description }) => {\n const debug = boolean('debug', false);\n const debugState = boolean('Enable debug state', false);\n const bulletTitle = text('title', 'Error rate', 'General');\n const subtitle = text('subtitle', '', 'General');\n const value = number('value', 56, { range: true, min: -200, max: 200 }, 'General');\n const target = number('target', 75, { range: true, min: -200, max: 200 }, 'General');\n const start = number('start', 0, { range: true, min: -200, max: 200 }, 'General');\n const end = number('end', 100, { range: true, min: -200, max: 200 }, 'General');\n const format = text('format (numeraljs)', '0.[0]', 'General');\n const formatter = (d: number) => numeral(d).format(format);\n const subtype = getKnobFromEnum('subtype', BulletSubtype, BulletSubtype.horizontal, { group: 'General' });\n\n const niceDomain = boolean('niceDomain', false, 'Ticks');\n const tickStrategy = customKnobs.multiSelect(\n 'tick strategy',\n {\n Auto: 'auto',\n TickCount: 'count',\n TickPlacements: 'placements',\n },\n 'auto',\n 'select',\n 'Ticks',\n );\n const ticks = number('ticks(approx. count)', 5, { min: 0, step: 1 }, 'Ticks');\n const tickPlacements = customKnobs.numbersArray(\n 'ticks(placements)',\n [-200, -100, 0, 5, 10, 15, 20, 25, 50, 100, 200],\n undefined,\n 'Ticks',\n );\n\n return (\n <Chart title={title} description={description}>\n <Settings\n debug={debug}\n onRenderChange={getDebugStateLogger(debugState)}\n debugState={debugState}\n baseTheme={useBaseTheme()}\n />\n <Bullet\n id=\"bullet\"\n subtype={subtype}\n data={[\n [\n {\n target,\n value,\n title: bulletTitle,\n subtitle,\n domain: [start, end],\n niceDomain,\n ticks:\n tickStrategy[0] === 'count' ? ticks : tickStrategy[0] === 'placements' ? tickPlacements : undefined,\n valueFormatter: formatter,\n tickFormatter: formatter,\n },\n ],\n ]}\n />\n </Chart>\n );\n};\n\nExample.parameters = {\n resize: {\n width: 500,\n height: 500,\n boxShadow: '5px 5px 15px 5px rgba(0,0,0,0.29)',\n borderRadius: '6px',\n },\n};\n"; // @ts-ignore

var __LOCATIONS_MAP__ = {
"Example": {
Expand All @@ -111480,15 +111489,15 @@ var __LOCATIONS_MAP__ = {
},
"endLoc": {
"col": 1,
"line": 88
"line": 84
},
"startBody": {
"col": 36,
"line": 21
},
"endBody": {
"col": 1,
"line": 88
"line": 84
}
}
};
Expand Down Expand Up @@ -111581,9 +111590,7 @@ var Example = function Example(_, _ref) {
subtitle: subtitle,
domain: [start, end],
niceDomain: niceDomain,
ticks: tickStrategy[0] === 'count' ? ticks : tickStrategy[0] === 'placements' ? function () {
return tickPlacements;
} : undefined,
ticks: tickStrategy[0] === 'count' ? ticks : tickStrategy[0] === 'placements' ? tickPlacements : undefined,
valueFormatter: formatter,
tickFormatter: formatter
}]]
Expand All @@ -111601,7 +111608,7 @@ exports.Example.parameters = {
};
exports.Example.parameters = Object.assign({
storySource: {
source: "(_, { title, description }) => {\n const debug = boolean('debug', false);\n const debugState = boolean('Enable debug state', false);\n const bulletTitle = text('title', 'Error rate', 'General');\n const subtitle = text('subtitle', '', 'General');\n const value = number('value', 56, { range: true, min: -200, max: 200 }, 'General');\n const target = number('target', 75, { range: true, min: -200, max: 200 }, 'General');\n const start = number('start', 0, { range: true, min: -200, max: 200 }, 'General');\n const end = number('end', 100, { range: true, min: -200, max: 200 }, 'General');\n const format = text('format (numeraljs)', '0.[0]', 'General');\n const formatter = (d: number) => numeral(d).format(format);\n const subtype = getKnobFromEnum('subtype', BulletSubtype, BulletSubtype.horizontal, { group: 'General' });\n\n const niceDomain = boolean('niceDomain', false, 'Ticks');\n const tickStrategy = customKnobs.multiSelect(\n 'tick strategy',\n {\n Auto: 'auto',\n TickCount: 'count',\n TickPlacements: 'placements',\n },\n 'auto',\n 'select',\n 'Ticks',\n );\n const ticks = number('ticks(approx. count)', 5, { min: 0, step: 1 }, 'Ticks');\n const tickPlacements = customKnobs.numbersArray(\n 'ticks(placements)',\n [-200, -100, 0, 5, 10, 15, 20, 25, 50, 100, 200],\n undefined,\n 'Ticks',\n );\n\n return (\n <Chart title={title} description={description}>\n <Settings\n debug={debug}\n onRenderChange={getDebugStateLogger(debugState)}\n debugState={debugState}\n baseTheme={useBaseTheme()}\n />\n <Bullet\n id=\"bullet\"\n subtype={subtype}\n data={[\n [\n {\n target,\n value,\n title: bulletTitle,\n subtitle,\n domain: [start, end],\n niceDomain,\n ticks:\n tickStrategy[0] === 'count'\n ? ticks\n : tickStrategy[0] === 'placements'\n ? () => tickPlacements\n : undefined,\n valueFormatter: formatter,\n tickFormatter: formatter,\n },\n ],\n ]}\n />\n </Chart>\n );\n}"
source: "(_, { title, description }) => {\n const debug = boolean('debug', false);\n const debugState = boolean('Enable debug state', false);\n const bulletTitle = text('title', 'Error rate', 'General');\n const subtitle = text('subtitle', '', 'General');\n const value = number('value', 56, { range: true, min: -200, max: 200 }, 'General');\n const target = number('target', 75, { range: true, min: -200, max: 200 }, 'General');\n const start = number('start', 0, { range: true, min: -200, max: 200 }, 'General');\n const end = number('end', 100, { range: true, min: -200, max: 200 }, 'General');\n const format = text('format (numeraljs)', '0.[0]', 'General');\n const formatter = (d: number) => numeral(d).format(format);\n const subtype = getKnobFromEnum('subtype', BulletSubtype, BulletSubtype.horizontal, { group: 'General' });\n\n const niceDomain = boolean('niceDomain', false, 'Ticks');\n const tickStrategy = customKnobs.multiSelect(\n 'tick strategy',\n {\n Auto: 'auto',\n TickCount: 'count',\n TickPlacements: 'placements',\n },\n 'auto',\n 'select',\n 'Ticks',\n );\n const ticks = number('ticks(approx. count)', 5, { min: 0, step: 1 }, 'Ticks');\n const tickPlacements = customKnobs.numbersArray(\n 'ticks(placements)',\n [-200, -100, 0, 5, 10, 15, 20, 25, 50, 100, 200],\n undefined,\n 'Ticks',\n );\n\n return (\n <Chart title={title} description={description}>\n <Settings\n debug={debug}\n onRenderChange={getDebugStateLogger(debugState)}\n debugState={debugState}\n baseTheme={useBaseTheme()}\n />\n <Bullet\n id=\"bullet\"\n subtype={subtype}\n data={[\n [\n {\n target,\n value,\n title: bulletTitle,\n subtitle,\n domain: [start, end],\n niceDomain,\n ticks:\n tickStrategy[0] === 'count' ? ticks : tickStrategy[0] === 'placements' ? tickPlacements : undefined,\n valueFormatter: formatter,\n tickFormatter: formatter,\n },\n ],\n ]}\n />\n </Chart>\n );\n}"
}
}, exports.Example.parameters);

Expand Down Expand Up @@ -162899,4 +162906,4 @@ module.exports = __webpack_require__(/*! /app/storybook/generated-stories-entry.
/***/ })

},[[0,"runtime~main","vendors~main"]]]);
//# sourceMappingURL=main.417aecd6.iframe.bundle.js.map
//# sourceMappingURL=main.c206cd9a.iframe.bundle.js.map

Large diffs are not rendered by default.

0 comments on commit 5b6e0fe

Please sign in to comment.