import React from 'react';
import propTypes from 'prop-types';
import ChartistGraph from 'react-chartist';
import '../styles/chart.css';
import '../styles/main.css'


export const Chart = ({ type, options, data, ...props }) => {
    return (
        <>
            <svg style={{ 'height': 0, width: '0' }}>
                <defs>
                    <linearGradient id="uptrend-gradient" x1="0" x2="0" y1="0" y2="1">
                        <stop offset="0%" stop-color="#5BE2A7" stop-opacity="0.8" />
                        <stop offset="100%" stop-color="#5BE2A7" stop-opacity="0.1" />
                    </linearGradient>
                </defs>
            </svg>
            <ChartistGraph type={type} data={data} options={options} {...props} />
        </>
    );
}