Добавлен проп короткого названия датасета

This commit is contained in:
goodmice 2022-07-18 18:04:18 +05:00
parent 1da3bbe290
commit e147d11fdc
4 changed files with 3 additions and 4 deletions

View File

@ -228,8 +228,6 @@ const _D3MonitoringCharts = <DataType extends Record<string, unknown>>({
})
}, [groups, data])
console.log(chartDomains)
useEffect(() => {
if (isDev()) {
datasetGroups.forEach((sets, i) => {

View File

@ -56,7 +56,7 @@ const makeDefaultRender = <DataType,>(): D3GroupRenderFunction<DataType> => (gro
<div className={'tooltip-group'} key={chart.key}>
<div className={'group-label'}>
<Icon style={{ color: chart.color }} />
<span>{chart.label}:</span>
<span>{chart.shortLabel || chart.label}:</span>
</div>
{data.map((d, i) => (
<span key={`${i}`}>

View File

@ -50,7 +50,7 @@ export const makeDefaultRender = <DataType,>(): D3RenderFunction<DataType> => (d
<div className={'tooltip-group'} key={chart.key}>
<div className={'group-label'}>
<Icon style={{ color: chart.color }} />
<span>{chart.label}:</span>
<span>{chart.shortLabel || chart.label}:</span>
</div>
{data.map((d, i) => (
<span key={`${i}`}>

View File

@ -30,6 +30,7 @@ export type BaseChartDataset<DataType> = {
yAxis: ChartAxis<DataType>
xAxis: ChartAxis<DataType>
label?: ReactNode
shortLabel?: ReactNode
color?: Property.Color
opacity?: number
width?: number | string