Put together all chart-related helper functions

This commit is contained in:
Alejandro Celaya
2020-09-20 11:46:07 +02:00
parent 78d97a64aa
commit 421cc5b718
4 changed files with 29 additions and 29 deletions

View File

@@ -3,11 +3,11 @@ import { Doughnut, HorizontalBar } from 'react-chartjs-2';
import { keys, values } from 'ramda';
import classNames from 'classnames';
import Chart, { ChartData, ChartDataSets, ChartOptions } from 'chart.js';
import { fillTheGaps, renderDoughnutChartLabel, renderNonDoughnutChartLabel } from '../../utils/helpers/visits';
import { fillTheGaps} from '../../utils/helpers/visits';
import { Stats } from '../types';
import { prettify } from '../../utils/helpers/numbers';
import { pointerOnHover, renderDoughnutChartLabel, renderNonDoughnutChartLabel } from '../../utils/helpers/charts';
import './DefaultChart.scss';
import { pointerOnHover } from '../../utils/helpers/charts';
export interface DefaultChartProps {
title: Function | string;

View File

@@ -13,13 +13,13 @@ import { always, cond, reverse } from 'ramda';
import moment from 'moment';
import Chart, { ChartData, ChartDataSets, ChartOptions } from 'chart.js';
import { NormalizedVisit, Stats } from '../types';
import { fillTheGaps, renderNonDoughnutChartLabel } from '../../utils/helpers/visits';
import { fillTheGaps} from '../../utils/helpers/visits';
import { useToggle } from '../../utils/helpers/hooks';
import { rangeOf } from '../../utils/utils';
import ToggleSwitch from '../../utils/ToggleSwitch';
import { prettify } from '../../utils/helpers/numbers';
import { pointerOnHover, renderNonDoughnutChartLabel } from '../../utils/helpers/charts';
import './LineChartCard.scss';
import { pointerOnHover } from '../../utils/helpers/charts';
interface LineChartCardProps {
title: string;