zz-chart
Advanced tools
Comparing version 0.1.0-beta.27 to 0.1.0-beta.28
@@ -1,2 +0,1 @@ | ||
/// <reference types="web" /> | ||
import { Shape } from './index.js'; | ||
@@ -3,0 +2,0 @@ export declare type StepType = 'start' | 'end'; |
@@ -20,2 +20,3 @@ import { getSeriesPathType } from '../../strategy/utils.js'; | ||
getSeries() { | ||
console.log(this.ctrl.getOption()); | ||
return this.getData().map(({ color, name }) => { | ||
@@ -22,0 +23,0 @@ return { |
@@ -47,2 +47,5 @@ import uPlot from 'uplot'; | ||
y: boolean; | ||
points: { | ||
show: boolean; | ||
}; | ||
drag: { | ||
@@ -49,0 +52,0 @@ x: boolean; |
@@ -91,3 +91,3 @@ import { StyleSheet, css } from 'aphrodite/no-important.js'; | ||
this.container.innerHTML = ` | ||
${this.getTooltipTitle(title)} | ||
${this.getTooltipTitle(title, values)} | ||
${isEl ? '' : list} | ||
@@ -97,3 +97,3 @@ `; | ||
} | ||
getTooltipTitle(title) { | ||
getTooltipTitle(title, values) { | ||
const { showTitle, titleFormatter } = this.option; | ||
@@ -108,3 +108,3 @@ if (String(showTitle) === 'false') { | ||
if (isFunction(titleFormatter)) { | ||
tpl = titleFormatter(title); | ||
tpl = titleFormatter(title, values); | ||
} | ||
@@ -111,0 +111,0 @@ return `<div class="${css(styles['tooltip-title'])}">${tpl}</div>`; |
@@ -46,2 +46,5 @@ import { axesSpace } from './utils.js'; | ||
y: boolean; | ||
points: { | ||
show: boolean; | ||
}; | ||
drag: { | ||
@@ -48,0 +51,0 @@ x: boolean; |
@@ -62,2 +62,5 @@ import { axesSpace } from './utils.js'; | ||
y: false, | ||
points: { | ||
show: false | ||
}, | ||
drag: { | ||
@@ -64,0 +67,0 @@ x: false, |
@@ -16,2 +16,6 @@ import UPlot from 'uplot'; | ||
} | ||
export interface BrushContext { | ||
start: number; | ||
end: number; | ||
} | ||
/** | ||
@@ -18,0 +22,0 @@ * 渲染策略 |
@@ -137,2 +137,3 @@ import { merge, mergeWith, omit } from 'lodash'; | ||
this.changeSize(size || this.ctrl.size); | ||
this.uPlot.setCursor; | ||
} | ||
@@ -139,0 +140,0 @@ /** |
@@ -92,3 +92,3 @@ /// <reference types="react" resolution-mode="require"/> | ||
showTitle?: boolean; | ||
titleFormatter?: string | ((title: string) => string); | ||
titleFormatter?: string | ((title: string, values: TooltipValue[]) => string); | ||
nameFormatter?: string | ((name: string) => string); | ||
@@ -95,0 +95,0 @@ valueFormatter?: string | ((value: TooltipValue) => string); |
{ | ||
"name": "zz-chart", | ||
"version": "0.1.0-beta.27", | ||
"version": "0.1.0-beta.28", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "author": "Alauda", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
505074
13252