Commit 8687048c authored by XieZhiXiong's avatar XieZhiXiong

fix: 修复指针不显示的问题

parent 9c3e9605
...@@ -4,14 +4,14 @@ import { ...@@ -4,14 +4,14 @@ import {
Coordinate, Coordinate,
Point, Point,
Annotation, Annotation,
registerShape,
} from 'bizcharts'; } from 'bizcharts';
// import Point from 'bizcharts/lib/geometry/Point';
// import { Annotation } from 'bizcharts/lib';
import { registerShape } from '@antv/g2';
import React from 'react'; import React from 'react';
import autoHeight from '../autoHeight'; import autoHeight from '../autoHeight';
import { getIntl } from 'umi'; import { getIntl } from 'umi';
const intl = getIntl(); const intl = getIntl();
export interface GaugeProps { export interface GaugeProps {
title: React.ReactText; title: React.ReactText;
color?: string; color?: string;
...@@ -73,7 +73,7 @@ registerShape('point', 'pointer', { ...@@ -73,7 +73,7 @@ registerShape('point', 'pointer', {
attrs: { attrs: {
x: center.x, x: center.x,
y: center.y, y: center.y,
r: 6, r: 4,
stroke: cfg.color, stroke: cfg.color,
lineWidth: 3, lineWidth: 3,
fill: '#fff', fill: '#fff',
...@@ -103,6 +103,7 @@ const Gauge: React.FC<GaugeProps> = (props) => { ...@@ -103,6 +103,7 @@ const Gauge: React.FC<GaugeProps> = (props) => {
nice: true, nice: true,
}, },
}; };
const data = [{ value: percent / 10 }]; const data = [{ value: percent / 10 }];
const textStyle: { const textStyle: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment