mdt-charts 1.12.6 → 1.12.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { IAxisModel, IScaleModel } from "../../../model/model";
1
+ import { AxisModelOptions, IAxisModel, IScaleModel } from "../../../model/model";
2
2
  import { Block } from "../../block/block";
3
3
  import { Scales } from "../scale/scale";
4
4
  import { Size } from '../../../config/config';
@@ -6,6 +6,8 @@ export declare class Axis {
6
6
  static axesClass: string;
7
7
  static render(block: Block, scales: Scales, scaleModel: IScaleModel, axisModel: IAxisModel, blockSize: Size): void;
8
8
  static update(block: Block, scales: Scales, scalesOptions: IScaleModel, axisModel: IAxisModel, blockSize: Size, keyDomainsEquality: boolean): void;
9
+ static raiseKeyAxis(block: Block, axisOptions: AxisModelOptions): void;
10
+ private static findAxis;
9
11
  private static renderAxis;
10
12
  private static updateValueAxis;
11
13
  private static updateKeyAxis;
@@ -20,6 +20,14 @@ export class Axis {
20
20
  if (axisModel.key.visibility)
21
21
  this.updateKeyAxis(block, scales.key, scalesOptions.key, axisModel.key, blockSize, keyDomainsEquality);
22
22
  }
23
+ static raiseKeyAxis(block, axisOptions) {
24
+ const axisElement = this.findAxis(block, axisOptions.cssClass);
25
+ axisElement.raise();
26
+ }
27
+ static findAxis(block, axisCssClass) {
28
+ return block.getSvg()
29
+ .select(`g.${axisCssClass}`);
30
+ }
23
31
  static renderAxis(block, scale, scaleOptions, axisOptions, blockSize) {
24
32
  const axisGenerator = AxisHelper.getBaseAxisGenerator(axisOptions, scale, scaleOptions);
25
33
  if (axisOptions.type === 'value' && (scaleOptions.type === 'linear' || scaleOptions.type === 'datetime'))
@@ -22,6 +22,7 @@ export class TwoDimensionalManager {
22
22
  Axis.render(engine.block, scales, options.scale, options.axis, model.blockCanvas.size);
23
23
  GridLine.render(engine.block, options.additionalElements.gridLine.flag, options.axis, model.blockCanvas.size, model.chartBlock.margin, scales);
24
24
  this.renderCharts(engine.block, options.charts, scales, engine.data, options.data, model.chartBlock.margin, options.axis.key.orient, options.chartSettings.bar, model.blockCanvas.size);
25
+ Axis.raiseKeyAxis(engine.block, options.axis.key);
25
26
  engine.block.filterEventManager.registerEventFor2D(scales.key, model.chartBlock.margin, model.blockCanvas.size, options);
26
27
  engine.block.filterEventManager.event2DUpdate(options);
27
28
  Title.render(engine.block, options.title, model.otherComponents.titleBlock, model.blockCanvas.size);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mdt-charts",
3
- "version": "1.12.6",
3
+ "version": "1.12.7",
4
4
  "description": "",
5
5
  "main": "lib/main.js",
6
6
  "scripts": {