import React, { Component } from 'react'; import { setTheme, Chart, Geom, Axis, Tooltip, Coord, Label, Legend, View, Guide, Shape } from 'bizcharts'; import DataSet from '@antv/data-set'; import data from '../../data/relationship-with-weight.json'; const { DataView } = DataSet; const { Text } = Guide; const ds = new DataSet(); const dv = ds.createView().source(data, { type: 'graph', edges: d => d.links }); dv.transform({ type: 'diagram.arc', marginRatio: 0.5, // sortBy: 'frequency' // id, weight, frequency, {function} }); export default class Arc extends Component { render() { setTheme("dark"); return (
bizcharts do not support set chart's separate theme, just support setTheme global. so when this chart is opened, the all charts's theme is setted to dark.