Compare commits
65 Commits
marker-cal
...
main
Author | SHA1 | Date |
---|---|---|
vargburz | b3e7f943ad | 3 months ago |
vargburz | a8408a748c | 3 months ago |
vargburz | 6e6fa7dc8e | 3 months ago |
rozetko | f67ce313dd | 4 months ago |
rozetko | c1c3b77dac | 4 months ago |
rozetko | 53c233b969 | 4 months ago |
vargburz | ebcb3185cd | 4 months ago |
vargburz | 6422b49bf0 | 4 months ago |
vargburz | 3f9342b5e1 | 4 months ago |
vargburz | bb46fe79be | 4 months ago |
rozetko | 0c3b404155 | 4 months ago |
rozetko | 85cd952b9f | 4 months ago |
rozetko | 701feaaf2f | 4 months ago |
rozetko | ebb49adf82 | 4 months ago |
rozetko | f38829787c | 4 months ago |
rozetko | 6549415feb | 4 months ago |
rozetko | 117c0af469 | 4 months ago |
rozetko | aac8f6f5ac | 4 months ago |
rozetko | f4354d7a77 | 4 months ago |
rozetko | 529f439ac9 | 5 months ago |
rozetko | 121f7a0305 | 5 months ago |
rozetko | 7e721ab880 | 5 months ago |
rozetko | 3663d3eaaa | 5 months ago |
Coin de Gamma | bd598d6a0b | 6 months ago |
glitch4347 | 4620ef7aa9 | 6 months ago |
rozetko | 44a4e6ce74 | 6 months ago |
glitch4347 | 04a01b75a1 | 6 months ago |
glitch4347 | bf3aab2db1 | 6 months ago |
Coin de Gamma | 348a289f1a | 8 months ago |
glitch4347 | 17a2fdf94e | 8 months ago |
Coin de Gamma | dc89f6cbb9 | 8 months ago |
glitch4347 | 547c15c0b6 | 8 months ago |
glitch4347 | 32d122ba4d | 8 months ago |
glitch4347 | 9c165f4e1f | 8 months ago |
Coin de Gamma | ec2bd27acd | 9 months ago |
glitch4347 | 815144d209 | 9 months ago |
glitch4347 | 1a80ca2cab | 9 months ago |
Coin de Gamma | ee08db2f54 | 9 months ago |
glitch4347 | 884fed6582 | 9 months ago |
glitch4347 | 8aca72ce04 | 9 months ago |
Coin de Gamma | c62a1c386f | 9 months ago |
glitch4347 | de6237891c | 9 months ago |
rozetko | 7bcd0d298a | 10 months ago |
rozetko | ee2f02be96 | 10 months ago |
rozetko | 456b888fe1 | 10 months ago |
rozetko | a34c0574e4 | 10 months ago |
rozetko | 73dbf0ea67 | 10 months ago |
rozetko | ff5973b106 | 10 months ago |
rozetko | 878e86d849 | 10 months ago |
vargburz | 1e8f8d0cb3 | 11 months ago |
rozetko | 39412e5f65 | 11 months ago |
rozetko | 37da147343 | 11 months ago |
glitch4347 | 0dac1c390e | 11 months ago |
glitch4347 | 07f454fe51 | 11 months ago |
vargburz | 88d6b2b24a | 11 months ago |
glitch4347 | 837004c2ad | 11 months ago |
glitch4347 | e46c7bdfb6 | 11 months ago |
rozetko | ee7a57685f | 12 months ago |
rozetko | 963011b274 | 12 months ago |
glitch4347 | 283f0995e8 | 12 months ago |
rozetko | 19689a68cd | 12 months ago |
glitch4347 | 79b759569f | 12 months ago |
glitch4347 | d66da50c1a | 12 months ago |
glitch4347 | d9d1b5e501 | 12 months ago |
Coin de Gamma | b8cd14e4b8 | 12 months ago |
33 changed files with 2139 additions and 289 deletions
@ -0,0 +1,42 @@
|
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<meta content="text/html;charset=utf-8" http-equiv="Content-Type"> |
||||
<meta content="utf-8" http-equiv="encoding"> |
||||
|
||||
<script src="../dist/index.dev.js" type="text/javascript"></script> |
||||
</head> |
||||
<body> |
||||
<div id="chart" style="width: 50%; height: 500px;"></div> |
||||
|
||||
<script type="text/javascript"> |
||||
let options = { |
||||
renderLegend: false, usePanning: false, |
||||
axis: { |
||||
x: { format: 'numeric', range: [0, 100] }, |
||||
y: { invert: true, range: [0, 100] }, |
||||
y1: { isActive: true, format: 'numeric', range: [0, 1000] }, |
||||
}, |
||||
zoomEvents: { |
||||
mouse: { zoom: { isActive: false, orientation: 'horizontal' } }, |
||||
scroll: { zoom: { isActive: false, orientation: 'horizontal' } } |
||||
}, |
||||
} |
||||
const data1 = [[0,0], [35, 40], [65, 60], [100, 100]]; |
||||
const data2 = [[0,0], [35, 50], [65, 65], [80, 100]]; |
||||
const data3 = [[0,0], [35, 20], [65, 50], [100, 80]]; |
||||
const data4 = [[0,900], [35, 800], [65, 700], [100, 600]]; |
||||
var pod = new LinePod( |
||||
document.getElementById('chart'), |
||||
[ |
||||
{ target: 'test1', datapoints: data1, color: 'green', renderArea: 'Above' }, |
||||
{ target: 'test2', datapoints: data2, color: 'blue', renderArea: 'Below' }, |
||||
{ target: 'test3', datapoints: data3, color: 'orange', renderArea: 'Below', yOrientation: 'right' }, |
||||
{ target: 'test4', datapoints: data4, color: 'purple', renderArea: 'Above', yOrientation: 'right' }, |
||||
], |
||||
options |
||||
); |
||||
pod.render(); |
||||
</script> |
||||
</body> |
||||
</html> |
@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<meta content="text/html;charset=utf-8" http-equiv="Content-Type"> |
||||
<meta content="utf-8" http-equiv="encoding"> |
||||
<script src="../dist/index.dev.js" type="text/javascript"></script> |
||||
</head> |
||||
<body> |
||||
<div id="chart" style="width: 50%; height: 500px;"></div> |
||||
<script type="text/javascript"> |
||||
const startTime = 1590590148; |
||||
const data = Array.from( |
||||
{ length: 20 }, |
||||
(el, idx) => [startTime + idx * 10000, Math.floor(Math.random() * 30)] |
||||
); |
||||
let options = { |
||||
renderLegend: false, usePanning: false, |
||||
axis: { y: { range: [0, 50] } }, |
||||
zoomEvents: { mouse: { |
||||
zoom: { isActive: false }, |
||||
pan: { isActive: false }, |
||||
} }, |
||||
eventsCallbacks: { mouseClick: console.log } |
||||
} |
||||
var pod = new LinePod( |
||||
document.getElementById('chart'), |
||||
[{ datapoints: data }], |
||||
options |
||||
); |
||||
pod.render(); |
||||
</script> |
||||
</body> |
||||
</html> |
@ -0,0 +1,29 @@
|
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<meta content="text/html;charset=utf-8" http-equiv="Content-Type"> |
||||
<meta content="utf-8" http-equiv="encoding"> |
||||
<script src="../dist/index.dev.js" type="text/javascript"></script> |
||||
</head> |
||||
<body> |
||||
<div id="chart" style="width: 50%; height: 500px;"></div> |
||||
<script type="text/javascript"> |
||||
const startTime = 1590590148; |
||||
const data = Array.from( |
||||
{ length: 20 }, |
||||
(el, idx) => [startTime + idx * 10000, Math.floor(Math.random() * 30)] |
||||
); |
||||
let options = { |
||||
renderLegend: false, usePanning: false, |
||||
axis: { y: { range: [0, 50] } }, |
||||
eventsCallbacks: { mouseMove: console.log } |
||||
} |
||||
var pod = new LinePod( |
||||
document.getElementById('chart'), |
||||
[{ datapoints: data }], |
||||
options |
||||
); |
||||
pod.render(); |
||||
</script> |
||||
</body> |
||||
</html> |
@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<meta content="text/html;charset=utf-8" http-equiv="Content-Type"> |
||||
<meta content="utf-8" http-equiv="encoding"> |
||||
<script src="../dist/index.dev.js" type="text/javascript"></script> |
||||
</head> |
||||
<body> |
||||
<div id="chart" style="width: 50%; height: 500px;"></div> |
||||
<script type="text/javascript"> |
||||
const startTime = 1590590148; |
||||
const data = Array.from( |
||||
{ length: 20 }, |
||||
(el, idx) => [startTime + idx * 10000, Math.floor(Math.random() * 30)] |
||||
); |
||||
let options = { |
||||
renderLegend: false, usePanning: false, |
||||
axis: { y: { range: [0, 50] } }, |
||||
zoomEvents: { mouse: { |
||||
zoom: { isActive: false }, |
||||
pan: { isActive: false }, |
||||
} }, |
||||
eventsCallbacks: { contextMenu: (position) => console.log('contextMenu', position) } |
||||
} |
||||
var pod = new LinePod( |
||||
document.getElementById('chart'), |
||||
[{ datapoints: data }], |
||||
options |
||||
); |
||||
pod.render(); |
||||
</script> |
||||
</body> |
||||
</html> |
@ -0,0 +1,46 @@
|
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<meta content="text/html;charset=utf-8" http-equiv="Content-Type"> |
||||
<meta content="utf-8" http-equiv="encoding"> |
||||
|
||||
<script src="../dist/index.dev.js" type="text/javascript"></script> |
||||
</head> |
||||
<body> |
||||
<div id="chart" style="width: 100%; height: 500px;"></div> |
||||
|
||||
<script type="text/javascript"> |
||||
const startTime = 1701790172908; |
||||
const timeSerieData = [5, 6, 3, 7, 5, 6, 8, 4, 5, 6, 4, 3, 5, 7, 8] |
||||
.map((el, idx) => [startTime + idx * 1000, el]); |
||||
const segmentsData = [3, 6, 9].map(el => [startTime + el * 1000, startTime + (el + 1) * 1100]); |
||||
let options = { |
||||
renderLegend: false, |
||||
axis: { |
||||
y: { range: [0, 10] }, |
||||
x: { format: 'time' } |
||||
}, |
||||
} |
||||
var pod = new LinePod( |
||||
document.getElementById('chart'), |
||||
[ |
||||
{ datapoints: timeSerieData, color: 'black' }, |
||||
], |
||||
options, |
||||
undefined, |
||||
[ |
||||
{ |
||||
data: segmentsData, |
||||
color:'#FFE545', |
||||
select: true, |
||||
opacity: 0.4, |
||||
opacitySelect: 0.8, |
||||
onSelect: console.log, |
||||
onUnselect: console.log |
||||
} |
||||
] |
||||
); |
||||
pod.render(); |
||||
</script> |
||||
</body> |
||||
</html> |
@ -0,0 +1,37 @@
|
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<meta content="text/html;charset=utf-8" http-equiv="Content-Type"> |
||||
<meta content="utf-8" http-equiv="encoding"> |
||||
<script src="../dist/index.dev.js" type="text/javascript"></script> |
||||
</head> |
||||
<body> |
||||
<div id="chart" style="width: 50%; height: 500px;"></div> |
||||
<script type="text/javascript"> |
||||
const startTime = 1590590148; |
||||
const data = Array.from( |
||||
{ length: 20 }, |
||||
(el, idx) => [startTime + idx * 10000, Math.floor(Math.random() * 30)] |
||||
); |
||||
let options = { |
||||
renderLegend: false, usePanning: false, |
||||
axis: { y: { range: [0, 50] } }, |
||||
zoomEvents: { mouse: { |
||||
zoom: { isActive: true, orientation: "horizontal" }, |
||||
pan: { isActive: false }, |
||||
}}, |
||||
events: { |
||||
zoomOut: function(centers, ranges) { |
||||
console.log('zoomOut', centers, ranges); |
||||
} |
||||
} |
||||
} |
||||
var pod = new LinePod( |
||||
document.getElementById('chart'), |
||||
[{ datapoints: data }], |
||||
options |
||||
); |
||||
pod.render(); |
||||
</script> |
||||
</body> |
||||
</html> |
@ -1,117 +0,0 @@
|
||||
import { LineTimeSerie, LineOptions, LinePod } from '@chartwerk/line-pod'; |
||||
|
||||
import { AxisRange } from '@chartwerk/core/dist/types'; |
||||
import { MarkersConf } from '@chartwerk/line-pod/dist/models/marker'; |
||||
import { SegmentSerie } from '@chartwerk/line-pod/dist/models/segment'; |
||||
|
||||
import { useEffect, useRef, useState } from 'react'; |
||||
|
||||
import _ from 'lodash'; |
||||
|
||||
|
||||
export type ChartwerkLinePodProps = { |
||||
id?: string; |
||||
series: LineTimeSerie[]; |
||||
options?: LineOptions; |
||||
markersConf?: MarkersConf, |
||||
segments?: SegmentSerie[], |
||||
className?: string; |
||||
// TODO: callback types should be exported from chartwerk
|
||||
onZoomIn?: (ranges: AxisRange[]) => void; |
||||
onZoomOut?: (centers: { x: number, y: number }) => void; |
||||
onMouseMove?: (event: any) => void; |
||||
onMouseOut?: () => void; |
||||
onLegendClick?: (idx: number) => void, |
||||
onPanning?: (event: { ranges: AxisRange[], d3Event: any }) => void; |
||||
onPanningEnd?: (ranges: AxisRange[]) => void; |
||||
onContextMenu?: (evt: any) => void; |
||||
onSharedCrosshairMove?: (evt: any) => void; |
||||
onRenderStart?: () => void, |
||||
onRenderEnd?: () => void, |
||||
} |
||||
|
||||
export function ChartwerkLinePod(props: ChartwerkLinePodProps) { |
||||
|
||||
const [pod, setPod] = useState<LinePod | null>(null); |
||||
const [hack, setHack] = useState<number | null>(null); |
||||
|
||||
const chartRef = useRef(null); |
||||
const chart = chartRef.current; |
||||
|
||||
useEffect(() => { |
||||
// this function will be called on component unmount
|
||||
return () => { |
||||
if(pod === null) { return; } |
||||
// @ts-ignore
|
||||
pod.removeEventListeners(); |
||||
} |
||||
}, []); |
||||
|
||||
useEffect(() => { |
||||
if(chart === null) { return; } |
||||
|
||||
let eventsCallbacks = _.cloneDeep(props.options?.eventsCallbacks || {}); |
||||
if (props.onZoomIn) { |
||||
eventsCallbacks.zoomIn = props.onZoomIn; |
||||
} |
||||
if (props.onZoomOut) { |
||||
eventsCallbacks.zoomOut = props.onZoomOut; |
||||
} |
||||
if (props.onMouseMove) { |
||||
eventsCallbacks.mouseMove = props.onMouseMove; |
||||
} |
||||
if (props.onMouseOut) { |
||||
eventsCallbacks.mouseOut = props.onMouseOut; |
||||
} |
||||
if (props.onLegendClick) { |
||||
eventsCallbacks.onLegendClick = props.onLegendClick; |
||||
} |
||||
if (props.onPanning) { |
||||
eventsCallbacks.panning = props.onPanning; |
||||
} |
||||
if (props.onPanningEnd) { |
||||
eventsCallbacks.panningEnd = props.onPanningEnd; |
||||
} |
||||
if (props.onContextMenu) { |
||||
eventsCallbacks.contextMenu = props.onContextMenu; |
||||
} |
||||
if (props.onSharedCrosshairMove) { |
||||
eventsCallbacks.sharedCrosshairMove = props.onSharedCrosshairMove; |
||||
} |
||||
if (props.onRenderStart) { |
||||
eventsCallbacks.renderStart = props.onRenderStart; |
||||
} |
||||
|
||||
if(pod === null) { |
||||
const newPod = new LinePod( |
||||
// @ts-ignore
|
||||
chart, |
||||
props.series, |
||||
{ |
||||
...props.options, |
||||
eventsCallbacks |
||||
}, |
||||
props.markersConf, |
||||
props.segments |
||||
); |
||||
setPod(newPod); |
||||
newPod.render(); |
||||
} else { |
||||
pod.updateData(props.series, props.options); |
||||
} |
||||
}, [chart, pod, props.id, props.options, props.markersConf, props.segments]); |
||||
|
||||
// TODO: it's a hack to render the LinePod right after the div appears in DOM
|
||||
setTimeout(() => { |
||||
if(hack === null) { |
||||
setHack(1); |
||||
} |
||||
}, 1); |
||||
|
||||
|
||||
return ( |
||||
<div id={props.id} className={props.className} ref={chartRef}></div> |
||||
); |
||||
} |
||||
|
||||
export default ChartwerkLinePod; |
@ -0,0 +1,26 @@
|
||||
const path = require('path'); |
||||
|
||||
module.exports = { |
||||
entry: './src/index.tsx', |
||||
module: { |
||||
rules: [ |
||||
{ |
||||
test: /\.tsx?$/, |
||||
use: 'ts-loader', |
||||
exclude: /node_modules/, |
||||
}, |
||||
], |
||||
}, |
||||
resolve: { |
||||
extensions: ['.tsx', '.ts', '.js'], |
||||
}, |
||||
output: { |
||||
filename: 'index.js', |
||||
path: path.resolve(__dirname, '../dist'), |
||||
libraryTarget: 'umd', |
||||
umdNamedDefine: true, |
||||
}, |
||||
externals: [ |
||||
'@chartwerk/line-pod', 'react' |
||||
] |
||||
}; |
@ -0,0 +1,8 @@
|
||||
const baseWebpackConfig = require('./webpack.base.conf'); |
||||
|
||||
var conf = baseWebpackConfig; |
||||
conf.devtool = 'inline-source-map'; |
||||
conf.mode = 'development'; |
||||
conf.output.filename = 'index.dev.js'; |
||||
|
||||
module.exports = conf; |
@ -0,0 +1,6 @@
|
||||
const baseWebpackConfig = require('./webpack.base.conf'); |
||||
|
||||
var conf = baseWebpackConfig; |
||||
conf.mode = 'production'; |
||||
|
||||
module.exports = baseWebpackConfig; |
@ -0,0 +1,23 @@
|
||||
{ |
||||
"name": "line-pod-react", |
||||
"version": "0.0.1", |
||||
"description": "React wrapper around line-pod", |
||||
"main": "dist/index.js", |
||||
"repository": "http://code.corpglory.net/chartwerk/line-pod.git", |
||||
"author": "CorpGlory Inc.", |
||||
"license": "ISC", |
||||
"scripts": { |
||||
"build": "webpack --config build/webpack.prod.conf.js", |
||||
"dev": "webpack --config build/webpack.dev.conf.js" |
||||
}, |
||||
"dependencies": { |
||||
"@chartwerk/line-pod": "workspace:*", |
||||
"react": "^18.2.0", |
||||
"react-dom": "^18.2.0" |
||||
}, |
||||
"devDependencies": { |
||||
"ts-loader": "^9.5.1", |
||||
"typescript": "^5.4.3", |
||||
"webpack": "^5.87.0" |
||||
} |
||||
} |
@ -0,0 +1,74 @@
|
||||
import { LineTimeSerie, LineOptions, LinePod } from '@chartwerk/line-pod'; |
||||
import { MarkersConf } from '@chartwerk/line-pod/dist/models/marker'; |
||||
import { SegmentSerie } from '@chartwerk/line-pod/dist/models/segment'; |
||||
|
||||
import React, { useEffect, useRef, useState } from 'react'; |
||||
|
||||
import _ from 'lodash'; |
||||
|
||||
|
||||
export type ChartwerkLinePodProps = { |
||||
id?: string; |
||||
series: LineTimeSerie[]; |
||||
options?: LineOptions; |
||||
markersConf?: MarkersConf, |
||||
segments?: SegmentSerie[], |
||||
className?: string; |
||||
} |
||||
|
||||
export function ChartwerkLinePod(props: ChartwerkLinePodProps) { |
||||
|
||||
const [pod, setPod] = useState<LinePod | null>(null); |
||||
const [hack, setHack] = useState<number | null>(null); |
||||
|
||||
const chartRef = useRef(null); |
||||
const chart = chartRef.current; |
||||
|
||||
useEffect(() => { |
||||
// this function will be called on component unmount
|
||||
return () => { |
||||
if(pod === null) { return; } |
||||
// @ts-ignore
|
||||
pod.removeEventListeners(); |
||||
} |
||||
}, []); |
||||
|
||||
useEffect(() => { |
||||
if(chart === null) { return; } |
||||
if(pod === null) { |
||||
const newPod = new LinePod( |
||||
// @ts-ignore
|
||||
chart, |
||||
props.series, |
||||
props.options, |
||||
props.markersConf, |
||||
props.segments |
||||
); |
||||
setPod(newPod); |
||||
newPod.render(); |
||||
} else { |
||||
if(props.markersConf) { |
||||
pod.updateMarkers(props.markersConf); |
||||
} |
||||
if(props.segments) { |
||||
pod.updateSegments(props.segments); |
||||
} |
||||
// TODO: actually it's wrong logic with updates
|
||||
// because it creates new pod anyway
|
||||
pod.updateData(props.series, props.options); |
||||
} |
||||
}, [chart, props.id, props.options, props.markersConf, props.segments]); |
||||
|
||||
// TODO: it's a hack to render the LinePod right after the div appears in DOM
|
||||
setTimeout(() => { |
||||
if(hack === null) { |
||||
setHack(1); |
||||
} |
||||
}, 1); |
||||
|
||||
return ( |
||||
<div id={props.id} className={props.className} ref={chartRef}></div> |
||||
); |
||||
} |
||||
|
||||
export default ChartwerkLinePod; |
@ -0,0 +1,23 @@
|
||||
{ |
||||
"compilerOptions": { |
||||
"target": "es5", |
||||
"rootDir": "./src", |
||||
"module": "esnext", |
||||
"moduleResolution": "node", |
||||
"declaration": true, |
||||
"declarationDir": "dist", |
||||
"allowSyntheticDefaultImports": true, |
||||
"inlineSourceMap": false, |
||||
"sourceMap": true, |
||||
"noEmitOnError": false, |
||||
"emitDecoratorMetadata": false, |
||||
"experimentalDecorators": true, |
||||
"noImplicitReturns": true, |
||||
"noImplicitThis": false, |
||||
"noImplicitUseStrict": false, |
||||
"noImplicitAny": false, |
||||
"noUnusedLocals": false, |
||||
"baseUrl": "./src", |
||||
"jsx": "react" |
||||
} |
||||
} |
@ -1,4 +1,11 @@
|
||||
export type SegmentElement = [number, number, any?]; |
||||
|
||||
export type SegmentSerie = { |
||||
color: string; |
||||
data: [number, number, any][] // [from, to, payload] payload is any data for tooltip
|
||||
data: SegmentElement[] // [from, to, payload?] payload is any data for tooltip,
|
||||
select?: boolean, |
||||
opacity?: number, |
||||
opacitySelect?: number, |
||||
onSelect?: (SegmentElement) => void |
||||
onUnselect?: (SegmentElement) => void |
||||
} |
@ -1,13 +1,41 @@
|
||||
import { Serie, Options } from '@chartwerk/core'; |
||||
import { AxisRange } from '@chartwerk/core/dist/types'; |
||||
|
||||
type LineTimeSerieParams = { |
||||
maxLength: number, |
||||
renderDots: boolean, |
||||
renderLines: boolean, // TODO: refactor same as scatter-pod
|
||||
maxLength: number; |
||||
renderDots: boolean; |
||||
renderLines: boolean; // TODO: refactor same as scatter-pod
|
||||
dashArray: string; // dasharray attr, only for lines
|
||||
class: string; // option to add custom class to each serie element
|
||||
renderArea: boolean; // TODO: move to render type
|
||||
renderArea: AreaType; // default is none
|
||||
} |
||||
|
||||
export enum AreaType { |
||||
NONE = 'None', |
||||
ABOVE = 'Above', |
||||
BELOW = 'Below', |
||||
} |
||||
|
||||
export type LineTimeSerie = Serie & Partial<LineTimeSerieParams>; |
||||
export type LineOptions = Options; |
||||
export type LineOptions = Options & { |
||||
events? : { |
||||
zoomOut?: (centers: { |
||||
x: number; |
||||
y: number; |
||||
}, range: AxisRange[]) => void; |
||||
contextMenu?: (position: { |
||||
x: number; |
||||
y: number; |
||||
}) => void; |
||||
} |
||||
} |
||||
|
||||
export type MouseObj = { |
||||
x: number, |
||||
y: number, |
||||
xVal: number, |
||||
yVal: number, |
||||
series: { value: [number, number], color: string, label: string }[], |
||||
chartX: number, |
||||
chartWidth: number |
||||
} |
Loading…
Reference in new issue