Browse Source

new core

merge-requests/1/merge
vargburz 4 years ago
parent
commit
24932f91a1
  1. 10
      dist/index.d.ts
  2. 2
      dist/index.js
  3. 4
      package-lock.json
  4. 2
      package.json
  5. 28
      src/index.ts

10
dist/index.d.ts vendored

@ -74,15 +74,23 @@ export declare const VueChartwerkGaugePodObject: {
mounted(): void;
methods: {
render(): void;
renderSharedCrosshair(values: {
x?: number;
y?: number;
}): void;
hideSharedCrosshair(): void;
onPanningRescale(event: any): void;
renderChart(): void;
appendEvents(): void;
zoomIn(range: any): void;
zoomOut(center: any): void;
zoomOut(centers: any): void;
mouseMove(evt: any): void;
mouseOut(): void;
onLegendClick(idx: any): void;
panningEnd(range: any): void;
panning(range: any): void;
contextMenu(evt: any): void;
sharedCrosshairMove(event: any): void;
};
}[];
methods: {

2
dist/index.js vendored

File diff suppressed because one or more lines are too long

4
package-lock.json generated

@ -5,8 +5,8 @@
"requires": true,
"dependencies": {
"@chartwerk/core": {
"version": "github:chartwerk/core#ca53d7a950ed8d2e34c490badd49b25326bd76a9",
"from": "github:chartwerk/core#dist"
"version": "github:chartwerk/core#9c43a6053aa58115ad3a786cd5a262d225531e8d",
"from": "github:chartwerk/core#9c43a6053aa58115ad3a786cd5a262d225531e8d"
},
"@types/d3": {
"version": "5.16.4",

2
package.json

@ -11,7 +11,7 @@
"author": "CorpGlory",
"license": "Apache-2.0",
"dependencies": {
"@chartwerk/core": "github:chartwerk/core#dist"
"@chartwerk/core": "github:chartwerk/core#9c43a6053aa58115ad3a786cd5a262d225531e8d"
},
"devDependencies": {
"@types/d3": "^5.7.2",

28
src/index.ts

@ -1,6 +1,6 @@
import { GaugeTimeSerie, GaugeOptions, Stat, Stop, IconConfig, IconPosition} from './types';
import { GaugeTimeSerie, GaugeOptions, Stat, Stop, IconConfig, IconPosition } from './types';
import { ChartwerkPod, VueChartwerkPodMixin, ZoomType } from '@chartwerk/core';
import { ChartwerkPod, VueChartwerkPodMixin, AxisFormat } from '@chartwerk/core';
import { findClosest } from './utils';
@ -20,13 +20,29 @@ const VALUE_TEXT_MARGIN = 10;
const DEFAULT_ICON_SIZE = 20; //px
const DEFAULT_GAUGE_OPTIONS: GaugeOptions = {
usePanning: false,
renderLegend: false,
renderYaxis: false,
renderXaxis: false,
renderGrid: false,
zoomEvents: {
mouse: {
zoom: {
type: ZoomType.NONE
isActive: false,
},
pan: {
isActive: false
},
},
scroll: {
zoom: {
isActive: false
},
pan: {
isActive: false,
}
},
},
axis: {
x: { isActive: false, format: AxisFormat.NUMERIC },
y: { isActive: false, format: AxisFormat.NUMERIC },
},
margin: {
top: 0, bottom: 0,

Loading…
Cancel
Save