devextreme
Version:
HTML5 JavaScript Component Suite for Responsive Web Development
84 lines (83 loc) • 3.08 kB
JavaScript
/**
* DevExtreme (esm/viz/series/points/range_bar_point.js)
* Version: 21.1.4
* Build date: Mon Jun 21 2021
*
* Copyright (c) 2012 - 2021 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
import {
noop
} from "../../../core/utils/common";
import {
extend
} from "../../../core/utils/extend";
import barPoint from "./bar_point";
import rangeSymbolPointMethods from "./range_symbol_point";
var _extend = extend;
export default _extend({}, barPoint, {
deleteLabel: rangeSymbolPointMethods.deleteLabel,
_getFormatObject: rangeSymbolPointMethods._getFormatObject,
clearVisibility: function() {
var graphic = this.graphic;
if (graphic && graphic.attr("visibility")) {
graphic.attr({
visibility: null
})
}
},
setInvisibility: function() {
var graphic = this.graphic;
if (graphic && "hidden" !== graphic.attr("visibility")) {
graphic.attr({
visibility: "hidden"
})
}
this._topLabel.draw(false);
this._bottomLabel.draw(false)
},
getTooltipParams: function(location) {
var edgeLocation = "edge" === location;
var x;
var y;
if (this._options.rotated) {
x = edgeLocation ? this.x + this.width : this.x + this.width / 2;
y = this.y + this.height / 2
} else {
x = this.x + this.width / 2;
y = edgeLocation ? this.y : this.y + this.height / 2
}
return {
x: x,
y: y,
offset: 0
}
},
_translate: function() {
var barMethods = barPoint;
barMethods._translate.call(this);
if (this._options.rotated) {
this.width = this.width || 1
} else {
this.height = this.height || 1
}
},
hasCoords: rangeSymbolPointMethods.hasCoords,
_updateData: rangeSymbolPointMethods._updateData,
_getLabelPosition: rangeSymbolPointMethods._getLabelPosition,
_getLabelMinFormatObject: rangeSymbolPointMethods._getLabelMinFormatObject,
_updateLabelData: rangeSymbolPointMethods._updateLabelData,
_updateLabelOptions: rangeSymbolPointMethods._updateLabelOptions,
getCrosshairData: rangeSymbolPointMethods.getCrosshairData,
_createLabel: rangeSymbolPointMethods._createLabel,
_checkOverlay: rangeSymbolPointMethods._checkOverlay,
_checkLabelsOverlay: rangeSymbolPointMethods._checkLabelsOverlay,
_getOverlayCorrections: rangeSymbolPointMethods._getOverlayCorrections,
_drawLabel: rangeSymbolPointMethods._drawLabel,
_getLabelCoords: rangeSymbolPointMethods._getLabelCoords,
getLabel: rangeSymbolPointMethods.getLabel,
getLabels: rangeSymbolPointMethods.getLabels,
getBoundingRect: noop,
getMinValue: rangeSymbolPointMethods.getMinValue,
getMaxValue: rangeSymbolPointMethods.getMaxValue
});