Skip to content
Source
Sign inSign up
TanStack/react-charts

Default color option seems to have a "one off" issue. #226

Send to my agent
ClosedMA-MacDonald(GitHub profile, opens in a new tab) opened this issue 2 comments

Sorry I know you're probably sick of me...

For example: In order to apply colors properly to a two series chart you need to add three strings in the defaultColors array.

      <Chart
        options={{
          defaultColors: ["#4c26c9", "#f44336"],          // doesnt work
          // defaultColors: ['#4c26c9', '#f44336', ""],   // works
          data: data,
          primaryAxis,
          secondaryAxes
        }}
      />

https://codesandbox.io/s/modern-flower-kdfy9?file=/src/App.js

  1. Should be fixed with e0e985cb8ac4c284dc369ed903ac4d065271e8c5 👍

  2. tannerlinsley closed this

Sign in to join this conversation.