import * as React from 'react'
import { colors } from './GraphHelperServiceTyped'
import TwoLineDateLabel from '../components/Charts/Labels/TwoLineDateLabel'
const colorsWithoutHash = colors.map((color) => color.slice(1))
export const cartesianGridProps = {
vertical: false,
}
export function xAxisProps() {
return {
axisLine: false,
tickCount: 8,
domain: ['dataMin', 'dataMax'],
type: 'category',
interval: 'preserveStart',
height: 45,
tickLine: false,
tickMargin: 10,
tick: ,
}
}
export const yAxisProps = {
axisLine: false,
tickLine: false,
tickCount: 5,
tickMargin: 5,
width: 44,
orientation: 'right',
style: {
fontSize: '12px',
fill: 'rgb(116, 121, 157)',
},
type: 'number',
domain: ['auto', 'auto'],
}
export function areaProps(colorIndex = 0) {
const color = colors[colorIndex]
return {
type: 'monotone',
fillOpacity: 1,
fill: `url(${color})`,
dot: false,
strokeWidth: 4,
connectNulls: true,
activeDot: {
stroke: color,
fill: 'white',
strokeWidth: 3,
r: 4.6,
},
stroke: color,
strokeLinecap: 'round',
animationDuration: 1000,
}
}
interface GradientProps {
color: string
index: number
}
export function linearGradient(params: GradientProps) {
const { color, index } = params
return (
)
}
export const areaChartProps = {
margin: { top: 5, right: 5, left: 5, bottom: 5 },
}