[Bug] sankey chart tooltip has no title when there is on one node in depth 0
Version
2.0.5
Link to Minimal Reproduction
null
Steps to Reproduce
const spec = { type: 'sankey', data: [ { values: [ { nodes: [ { nodeName: "Agricultural 'waste'" }, { nodeName: 'Bio-conversion' }, { nodeName: 'Liquid' }, { nodeName: 'Losses' }, { nodeName: 'Solid' }, { nodeName: 'Gas' }, { nodeName: 'Biofuel imports' }, { nodeName: 'Biomass imports' }, { nodeName: 'Coal imports' }, { nodeName: 'Coal' }, { nodeName: 'Coal reserves' }, { nodeName: 'District heating' }, { nodeName: 'Industry' }, { nodeName: 'Heating and cooling - commercial' }, { nodeName: 'Heating and cooling - homes' }, { nodeName: 'Electricity grid' }, { nodeName: 'Over generation / exports' }, ], links: [ { "source": 0, "target": 1, "value": 241202 }, { "source": 0, "target": 2, "value": 49988 }, { "source": 0, "target": 3, "value": 2190 }, { "source": 0, "target": 4, "value": 20036 }, { "source": 0, "target": 5, "value": 13774 }, { "source": 1, "target": 6, "value": 39093 }, { "source": 1, "target": 7, "value": 37043 }, { "source": 1, "target": 8, "value": 160770 }, { "source": 1, "target": 9, "value": 4298 }, { "source": 2, "target": 6, "value": 11214 }, { "source": 2, "target": 7, "value": 18377 }, { "source": 2, "target": 8, "value": 1152 }, { "source": 2, "target": 9, "value": 19245 }, { "source": 3, "target": 7, "value": 134 }, { "source": 3, "target": 8, "value": 1722 }, { "source": 3, "target": 9, "value": 334 }, { "source": 4, "target": 7, "value": 15958 }, { "source": 4, "target": 8, "value": 3298 }, { "source": 4, "target": 9, "value": 780 }, { "source": 5, "target": 7, "value": 683 }, { "source": 5, "target": 8, "value": 13035 }, { "source": 5, "target": 9, "value": 56 }, { "source": 6, "target": 10, "value": 39004 }, { "source": 7, "target": 11, "value": 46571 }, { "source": 7, "target": 12, "value": 29468 }, { "source": 8, "target": 12, "value": 183345 }, { "source": 12, "target": 13, "value": 176318 }, { "source": 12, "target": 14, "value": 36495 }, { "source": 13, "target": 15, "value": 164902 }, { "source": 13, "target": 16, "value": 11633 }, { "source": 9, "target": 10, "value": 0 }, { "source": 10, "target": 13, "value": 0 }, { "source": 11, "target": 13, "value": 0 }, { "source": 14, "target": 16, "value": 0 } ] } ] } ], categoryField: 'nodeName', valueField: 'value', sourceField: 'source', targetField: 'target',
nodeAlign: 'justify', nodeGap: 8, nodeWidth: 10, minNodeHeight: 4,
title: { text: 'How energy is converted or transmitted before being consumed or lost', subtext: 'Data: Department of Energy & Climate Change via Tom Counsell', subtextStyle: { fontSize: 12 } },
label: { visible: true, style: { fontSize: 10 } },
node: { state: { hover: { stroke: '#333333' }, selected: { fill: '#dddddd', stroke: '#333333', lineWidth: 1, brighter: 1, fillOpacity: 1 } } },
link: { state: { hover: { fillOpacity: 1 }, selected: { fill: '#dddddd', stroke: '#333333', lineWidth: 1, brighter: 1, fillOpacity: 1 } } } };
const vchart = new VChart(spec, { dom: CONTAINER_ID }); vchart.renderSync();
// Just for the convenience of console debugging, DO NOT COPY! window['vchart'] = vchart;
Current Behavior
Expected Behavior
has title like this
Environment
- OS:
- Browser:
- Framework:
Any additional comments?
No response