import * as React from 'react'; import * as BizCharts from 'bizcharts'; import { Chart, View, Shape, Tooltip, Coord, Axis, Legend, Guide, Facet } from 'bizcharts'; const g2: any = BizCharts.G2; const global: G2.Global = g2.Global; global.setTheme('dark'); // lodash function const util: G2.Util = { each: ()=>{}, map: ()=>{}, isObject: ()=>{}, isNumber: ()=>{}, isString: ()=>{}, isFunction: ()=>{}, other: '' }; // same as use BizCharts.Util const util2: BizCharts.Util = util; util2.each(); util2.test(); const textStyle: G2.Styles.text = { fill: '#333', } const axisLabel: G2.AxisLabel = { offset: 10, } g2.track(); const chartProps: BizCharts.ChartProps = { height: 100, className: '123', } const viewProps: BizCharts.ViewProps = { start: {x: 0, y: 0.5}, filter: ['x', (val) => {return val > 20;}] } const tooltipCfg: BizCharts.TooltipProps = { containerTpl: '', itemTpl: '{index}{name}{value}k' }; interface myChartsState {} class MyCharts extends React.Component<{}, myChartsState> { render() : JSX.Element { return (
{}} // 自定义 hover 事件 onClick={ev => {}} // 自定义 click 事件 /> {return val > 20;}]}> {(view, facet)=>{ view.point().position('carat*price').color('cut'); }}
) } }