Skip to content

BUG: Cant use treegraph #218

Open
Open
@hellund

Description

@hellund

Describe the bug
I cant get treegraph to work using python. Tried simple implementations but nothing shows up when using display. Does not matter what data or options i do. If i set 'type' to 'treegraph', nothing displays.

To Reproduce
Steps to reproduce the behavior:

  1. When I attempt 'to run in jupyter notebook' using the following code: '.
from highcharts_core.highcharts import Chart
from highcharts_core.options import HighchartsOptions

# Sample data for the treegraph
tree_data = [
    {'id': 'A', 'name': 'Root'},
    {'id': 'B', 'name': 'Child 1', 'parent': 'A'},
    {'id': 'C', 'name': 'Child 2', 'parent': 'A'},
    {'id': 'D', 'name': 'Child 3', 'parent': 'B'},
    {'id': 'E', 'name': 'Child 4', 'parent': 'B'},
    {'id': 'F', 'name': 'Child 5', 'parent': 'C'}
]

# Define the chart options
options = HighchartsOptions(
    chart={'type': 'treegraph'},
    title={'text': 'Simple Treegraph'},
    series=[{
        'type': 'treegraph',
        'data': tree_data
    }]
)

# Create and display the chart
diagram = Chart(options=options)
diagram.display()
  1. I receive 'Nothing'
    Expected behavior
    To see a chart. Even if some options i wrong, I expect to see a blank chart

Your Environment:

  • OS: [e.g. Linux, Windows, etc.] macOS
  • Python Version: 3.12
  • Highcharts JavaScript Version: 10.3

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions