Отображение тултипа в TVD улучшено

This commit is contained in:
goodmice 2022-07-19 10:41:19 +05:00
parent c3b48d210c
commit e3066b7619

View File

@ -35,7 +35,7 @@ const tooltipRender = (data) => {
<LineChartOutlined style={{ color: chart.color }} />
<span>{chart.label}:</span>
</div>
{data.map((d, i) => {
{data.slice(0, 2).map((d, i) => {
const text = `${xFormat(chart.x(d))} :: ${yFormat(chart.y(d))}`
const href = ['plan', 'fact'].includes(chart.key) && `/well/${d.idWell}/operations/${chart.key}/?selectedId=${d.id}`
@ -103,7 +103,7 @@ const domain = {
}
const plugins = {
tooltip: { enabled: true, limit: 3, render: tooltipRender },
tooltip: { enabled: true, limit: 3, height: 200, render: tooltipRender },
menu: { enabled: false },
legend: { enabled: true, offset: { x: 400 }, type: 'horizontal' },
cursor: { enabled: false }