UNPKG

devextreme

Version:

JavaScript/TypeScript Component Suite for Responsive Web Development

49 lines (48 loc) 1.66 kB
/** * DevExtreme (esm/__internal/viz/range_selector/common.js) * Version: 25.2.5 * Build date: Fri Feb 20 2026 * * Copyright (c) 2012 - 2026 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/ */ import devices from "../../../core/devices"; import browser from "../../../core/utils/browser"; import { isFunction } from "../../../core/utils/type"; import { smartFormatter as _format } from "../../viz/axes/smart_formatter"; export const HEIGHT_COMPACT_MODE = 24; const POINTER_SIZE = 4; const EMPTY_SLIDER_MARKER_TEXT = ". . ."; export const utils = { trackerSettings: { fill: "grey", stroke: "grey", opacity: 1e-4 }, animationSettings: { duration: 250 } }; export const consts = { emptySliderMarkerText: ". . .", pointerSize: 4 }; export const formatValue = function(value, formatOptions, tickIntervalsInfo, valueType, type, logarithmBase) { const formatObject = { value: value, valueText: _format(value, { labelOptions: formatOptions, ticks: tickIntervalsInfo ? tickIntervalsInfo.ticks : [], tickInterval: tickIntervalsInfo ? tickIntervalsInfo.tickInterval : void 0, dataType: valueType, type: type, logarithmBase: logarithmBase }) }; return String(isFunction(formatOptions.customizeText) ? formatOptions.customizeText.call(formatObject, formatObject) : formatObject.valueText) }; export const isFirefoxOnAndroid = () => browser.mozilla && devices.real().android;