formidable-charts icon indicating copy to clipboard operation
formidable-charts copied to clipboard

Performance Issue

Open chriswetterman opened this issue 9 years ago • 2 comments

Hi. I'm using BarChart and notice the node process is using 400% of my CPU. When I logged out some values while setting the labels prop I notice it's constantly updating. Are there elements of the charts that constantly redraw? Is this expected behavior?

Thanks

` <BarChart

        horizontal
        responsive={false}
        domainPadding={24}
        height={200}
        data={[
          { x: "4/16", y: 60},
          { x: "12/16", y: 76 }
        ]}
        labels={ (datum) => { console.log(datum); return datum.y }}
        xAxis={{ label: "Score Total", tickValues:[15,30,45,60,75,90] }}
        style={{
          data: { width: 24 },
          labels: { fontSize: 12 },
          tickLabels: { fontSize:12 }
        }} />`

chriswetterman avatar Dec 08 '16 19:12 chriswetterman

When I change views it appears the d3 timer (did a little digging) is still running. So that seems to lean toward a memory leak as well.

chriswetterman avatar Dec 08 '16 19:12 chriswetterman

I do confirm the the high CPU usage with any of the provided charts with default props (ie, <BarChart />). CPU is low when using Victory components instead.

loris avatar Dec 15 '16 10:12 loris