mirror of
https://github.com/umami-software/umami.git
synced 2026-02-18 11:35:37 +01:00
Bar chart styling.
This commit is contained in:
parent
d936ecc86e
commit
a7e7469d22
9 changed files with 130 additions and 125 deletions
|
|
@ -1,7 +1,5 @@
|
|||
import React from 'react';
|
||||
import classNames from 'classnames';
|
||||
import BarChart from './BarChart';
|
||||
import styles from './PageviewsChart.module.css';
|
||||
|
||||
export default function PageviewsChart({ websiteId, data, unit, className, animationDuration }) {
|
||||
const handleUpdate = chart => {
|
||||
|
|
@ -22,31 +20,30 @@ export default function PageviewsChart({ websiteId, data, unit, className, anima
|
|||
}
|
||||
|
||||
return (
|
||||
<div className={classNames(styles.chart, className)}>
|
||||
<BarChart
|
||||
chartId={websiteId}
|
||||
datasets={[
|
||||
{
|
||||
label: 'unique visitors',
|
||||
data: data.uniques,
|
||||
lineTension: 0,
|
||||
backgroundColor: 'rgb(38, 128, 235, 0.4)',
|
||||
borderColor: 'rgb(13, 102, 208, 0.4)',
|
||||
borderWidth: 1,
|
||||
},
|
||||
{
|
||||
label: 'page views',
|
||||
data: data.pageviews,
|
||||
lineTension: 0,
|
||||
backgroundColor: 'rgb(38, 128, 235, 0.2)',
|
||||
borderColor: 'rgb(13, 102, 208, 0.2)',
|
||||
borderWidth: 1,
|
||||
},
|
||||
]}
|
||||
unit={unit}
|
||||
records={data.pageviews.length}
|
||||
onUpdate={handleUpdate}
|
||||
/>
|
||||
</div>
|
||||
<BarChart
|
||||
className={className}
|
||||
chartId={websiteId}
|
||||
datasets={[
|
||||
{
|
||||
label: 'unique visitors',
|
||||
data: data.uniques,
|
||||
lineTension: 0,
|
||||
backgroundColor: 'rgb(38, 128, 235, 0.4)',
|
||||
borderColor: 'rgb(13, 102, 208, 0.4)',
|
||||
borderWidth: 1,
|
||||
},
|
||||
{
|
||||
label: 'page views',
|
||||
data: data.pageviews,
|
||||
lineTension: 0,
|
||||
backgroundColor: 'rgb(38, 128, 235, 0.2)',
|
||||
borderColor: 'rgb(13, 102, 208, 0.2)',
|
||||
borderWidth: 1,
|
||||
},
|
||||
]}
|
||||
unit={unit}
|
||||
records={data.pageviews.length}
|
||||
onUpdate={handleUpdate}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue