Skip to content

[Bug] Error in "map" chart with seriesLayoutBy: 'row' #21520

@andrus

Description

@andrus

Version

6.0.0

Link to Minimal Reproduction

option code provided in the body

Steps to Reproduce

The following option properly renders as a map of Iceland with a numeric dataset displayed on mouse over each region:

var opt = {
    tooltip: {
        trigger: 'item',
    },
    dataset: {
        source: [
            ['L0', 'val'],
            ['Austurland', 1000],
            ['Suðurland', 256],
            ['Norðurland vestra', 489],
            ['Norðurland eystra', 51]
        ]
    },
    geo: {
        map: 'iceland',
        aspectScale: 0.42261826174069944,
        label: {
            show: true,
            position: 'inside'
        }
    },
    series: [
        {
            name: 'val',
            encode: {
                value: 1,
                itemName: 0,
            },
            seriesLayoutBy: 'column',
            coordinateSystem: 'geo',
            geoIndex: 0,
            type: 'map'
        },
    ]
}

Same option, but changing the dataset layout to row-based and setting seriesLayoutBy: 'row' results in an error shown in the next section.

var opt = {
    tooltip: {
        trigger: 'item',
    },
    dataset: {
        source: [
            ['L0','Austurland','Suðurland','Norðurland vestra','Norðurland eystra'],
            ['val',1000,256,489,51]
        ]
    },
    geo: {
        map: 'iceland',
        aspectScale: 0.42261826174069944,
        label: {
            show: true,
            position: 'inside'
        }
    },
    series: [
        {
            name: 'val',
            encode: {
                value: 1,
                itemName: 0,
            },
            seriesLayoutBy: 'row',
            coordinateSystem: 'geo',
            geoIndex: 0,
            type: 'map'
        },
    ]
}

Current Behavior

This error for the "row" layout

Image

Expected Behavior

No error should be thrown, the map of Iceland should display, mouse over the country regions should display dataset numbers.

Environment

- OS: MacOS
- Browser: agnostic, e.g., Firefox 148 or Chrome 145.0.7632.117
- Framework: N/A

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugenThis issue is in EnglishpendingWe are not sure about whether this is a bug/new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions