Skip to content

visualMap on time series incorrect line color #12366

@souperk

Description

@souperk

Version

4.7.0

Steps to reproduce

option = {
    xAxis: { type: 'time' },
    yAxis: { type: 'value' },
    visualMap: {
        type: 'piecewise',
        show: false,
        dimension: 0,
        max:   new Date('2020-04-01T01:00'),
        inRange: { color: "blue" },
        outOfRange: { color: "red" }
    },
    tooltip:{ trigger: "axis" },
    series: [{
        type: 'line',
        data: [
            ['2020-04-01T00:00', 200],
            ['2020-04-01T01:00', 400],
            ['2020-04-01T02:00', 650],
            ['2020-04-01T03:00', 500]
        ]
    }]
};

What is expected?

Line and points before 2020-04-01 01:00 to be colored blue. Line and points after 2020-04-01 01:00 to be colored red.

What is actually happening?

Points before 2020-04-01 01:00 are colored blue (correct) but line is colored red (wrong). Points and lines after 2020-04-01 01:00 are colored red (correct).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enThis issue is in EnglishstaleInactive for a long time. Will be closed in 7 days.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions