INNER CODE UNIT · JavaScript
Gauge
CCZX/wechat · chatAdmin/src/components/BizChart/DashBoard/index.js:54
export default class Gauge extends React.Component {
render() {
const { source, font } = this.props
const data = [{
value: Number(source)
}]
return (
<Chart width={200} height={300} data={data} scale={cols} padding={[-100, 0, 0, 0]} forceFit>
<Coord type="polar" startAngle={-9 / 8 * Math.PI} endAngle={1 / 8 * Math.PI} radius={0.75} />
<Axis
name="value"
zIndex={2}
line={null}
label={{
offset: -16,
textStyle: {
fontSize: 18,
textAlign: 'center',