8000 nodeFormat not working for Sankey Diagram · Issue #148 · highcharts-for-python/highcharts-core · GitHub
[go: up one dir, main page]

Skip to content
nodeFormat not working for Sankey Diagram #148
Closed
@JulienBacquart

Description

@JulienBacquart

Describe the bug
Whatever string format you specify for 'nodeFormat' for a tooltip in a Sankey Diagram, gets ignored and the result is always the same.
'pointFormat' works correctly.
Additionally 'valueSuffix' gets ignored for the node, but works correctly for the links.

To Reproduce
Minimal none working example:

from highcharts_core.chart import Chart

data = [{
        'from': 'France',
        'to': 'Portugal',
        'weight': 5,
    }
]

# Set chart options
options = {
    'chart': {
        'inverted': False,
    },
    'title': {
        'text': f"Title",
    },
    'subtitle': {
        'text': f"Subtitle",
    },
    'tooltip': {
        'headerFormat': 'null',
        'pointFormat': 'Working: {point.weight} Working',
        # Not working 
        'nodeFormat': '{point.name}: {point.sum} not Working!!!',
        # Not working for Node
        'valueSuffix': ' working_suffix'
    },
    'series': [{
        # 'nodes': nodes,
        'data': data,
        'type': 'sankey',
        'name': 'Sankey demo series',
    }],
}

my_chart = Chart(options = options)
my_chart.display()

highcharts_bug

Expected behavior
The 'nodeFormat' would have a behavior similar to 'pointFormat'.

Your Environment:

  • Windows 11
  • Python 3.11.7
  • Jupyter notebook Version: 7.0.6
  • highcharts-core Version: 1.5.1

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0