charts pointer
This commit is contained in:
@@ -3,14 +3,15 @@ import React, { useState } from 'react';
|
||||
import { Line } from 'react-chartjs-2';
|
||||
import { Chart as ChartJS, CategoryScale, LinearScale, PointElement, LineElement, Title, Tooltip, Legend } from 'chart.js';
|
||||
import { BsBorderWidth } from 'react-icons/bs';
|
||||
import { border, Box, Heading, Radio, RadioGroup, Stack } from '@chakra-ui/react';
|
||||
import { border, Box, Heading, Radio, RadioGroup, Stack, useColorMode } from '@chakra-ui/react';
|
||||
import ChartsTabs from '../ChartsTabs';
|
||||
|
||||
// Register the components of Chart.js you need
|
||||
ChartJS.register(CategoryScale, LinearScale, PointElement, LineElement, Title, Tooltip, Legend);
|
||||
|
||||
const LineChart = () => {
|
||||
|
||||
|
||||
const { colorMode} = useColorMode();
|
||||
|
||||
const data = {
|
||||
labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
||||
@@ -23,7 +24,7 @@ const LineChart = () => {
|
||||
// fill: true,
|
||||
tension: 0.3,
|
||||
pointRadius: 4,
|
||||
pointBackgroundColor: '#232127',
|
||||
pointBackgroundColor:colorMode === "light"? "#fff" :'#232127',
|
||||
pointBorderColor: '#978FED',
|
||||
pointHoverRadius: 5,
|
||||
pointHoverBackgroundColor: '#978FED',
|
||||
@@ -58,7 +59,6 @@ const LineChart = () => {
|
||||
titleColor: '#4B4B4B',
|
||||
bodyColor: '#4B4B4B',
|
||||
displayColors: false,
|
||||
boxShadow:"3px 3px 3px #000",
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user