ankane / react-chartkick

Create beautiful JavaScript charts with one line of React
https://chartkick.com/react
MIT License
1.2k stars 58 forks source link

library property does nothing (chart.js) #54

Closed DanielRuf closed 2 years ago

DanielRuf commented 3 years ago

It makes no difference, even when I try to change colors, nothing changes:

import React from 'react';
import { PieChart as PieChartComp } from 'react-chartkick'
// eslint-disable-next-line import/no-extraneous-dependencies
import 'chartkick/chart.js'

const PieChart = () => (
    <PieChartComp
        data={[["test", 44], ["test2", 23]]}
        library={{backgroundColor: ['rgb(255, 99, 132)',
        'rgb(54, 162, 235)',
        'rgb(255, 205, 86)']}}
        legend={false}
    />
)

export default PieChart;
ankane commented 2 years ago

Hey @DanielRuf, if you're not seeing a difference, it's likely not a valid library option (unfortunately, I don't have the bandwidth to help with app-specific customizations).

DanielRuf commented 2 years ago

Well, it is definitely a valid option afaik. Nonetheless, we switched to the recommended chartjs react wrapper library since we faced even more problems with react-chartkick and the latest chartjs version.

But thanks for the time to reply.