I am using chartist.js for making pie chart component. I want to make use of legend plugin https://codeyellowbv.github.io/chartist-plugin-legend/
I am not getting the le
You can use the plugin by adding it on the options property, but first you need to import the ff. dependencies:
import React, { Component } from 'react';
import ChartistGraph from "react-chartist";
import Legend from "chartist-plugin-legend";
add the plugin:
let options = {
width:400,
height:500,
plugins: [
Legend()
]
};
Render it:
and because the CSS is not included, you can examine the index file of the plugin here and play with it.