How to use the @jiaminghi/charts function in @jiaminghi/charts

To help you get started, we’ve selected a few @jiaminghi/charts examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DataV-Team / DataV-React / src / components / activeRingChart / index.js View on Github external
useEffect(() => {
    // 第一次时初始化
    chartRef.current || (chartRef.current = new Charts(domRef.current))

    const mergedConfig = deepMerge(deepClone(defaultConfig, true), config || {})

    chartRef.current.setOption(getRingOption(mergedConfig), true)

    let activeIndex = 0

    function * loop() {
      while (true) {
        setState({ mergedConfig, activeIndex })

        const option = getOption(mergedConfig, activeIndex)

        chartRef.current.setOption(option, true)

        const { activeTimeGap, data } = option.series[0]
github DataV-Team / DataV-React / src / components / charts / index.js View on Github external
useEffect(() => {
    chartInstanceofRef.current ||
      (chartInstanceofRef.current = new Chart(chartRef.current))

    chartInstanceofRef.current.setOption(option || {}, true)
  }, [option])

@jiaminghi/charts

Lightweight charting

MIT
Latest version published 4 years ago

Package Health Score

54 / 100
Full package analysis