Skip to content

VisualMap 在多个series下设置错误 #14346

Open

Description

@94385605

Version

5.0.2

Reproduction link

https://www.makeapie.com/editor.html?c=xtk0VJl99N&v=1

Steps to reproduce

option = {
    legend: {},
    tooltip: {},
	dataset: {
	    source: [
		    ['product', '2012', '2013', '2014', '2015'],
		    ['Matcha Latte', 41.1, 30.4, 65.1, 53.3],
		    ['Milk Tea', 86.5, 92.1, 85.7, 83.1],
		    ['Cheese Cocoa', 24.1, 67.2, 79.5, 86.4],
	    ],
	},
	xAxis: [{ type: 'category' }],
	yAxis: [{
		gridIndex: 0,
		splitNumber: 5,
	}],
	series: [
		{ type: 'bar' },
		{ type: 'bar' },
	],
	visualMap: [
		{
			type: 'piecewise',
			dimension: 2,
			outOfRange: { color: '#5470c6' },
			pieces: [
				{ lt: 40, color: 'yellow' },
			],
		},
	],
};

What is expected?

小于40的柱子颜色为黄色

What is actually happening?

同series的柱子大于40的也为黄色了

Activity

  1. echarts-bot commented on Feb 25, 2021

    @echarts-bot

    Hi! We've received your issue and please be patient to get responded. 🎉
    The average response time is expected to be within one day for weekdays.

    In the meanwhile, please make sure that you have posted enough image to demo your request. You may also check out the API and chart option to get the answer.

    If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to [email protected]. Please attach the issue link if it's a technical question.

    If you are interested in the project, you may also subscribe our mailing list.

    Have a nice day! 🍵

  2. added
    pending
    on Feb 25, 2021
  3. echarts-bot commented on Feb 25, 2021

    @echarts-bot

    @94385605 It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people, we'd like to suggest using English next time. 🤗

    TRANSLATED

    TITLE

    VisualMap is set incorrectly under multiple series

    BODY

    Version

    5.0.2

    Reproduction link

    https://www.makeapie.com/editor.html?c=xtk0VJl99N&v=1

    Steps to reproduce

    option = {
        legend: {},
        tooltip: {},
    dataset: {
    source: [
    ['product', '2012', '2013', '2014', '2015'],
    ['Matcha Latte', 41.1, 30.4, 65.1, 53.3],
    ['Milk Tea', 86.5, 92.1, 85.7, 83.1],
    ['Cheese Cocoa', 24.1, 67.2, 79.5, 86.4],
    ],
    },
    xAxis: [{ type:'category' }],
    yAxis: [{
    gridIndex: 0,
    splitNumber: 5,
    }],
    series: [
    {type:'bar' },
    {type:'bar' },
    ],
    visualMap: [
    {
    type:'piecewise',
    dimension: 2,
    outOfRange: {color:'#5470c6' },
    pieces: [
    {lt: 40, color:'yellow' },
    ],
    },
    ],
    };
    

    What is expected?

    The color of columns less than 40 is yellow

    What is actually happening?

    The columns of the same series that are greater than 40 are also yellow

  4. added and removed
    pending
    on Feb 25, 2021
  5. added this to the 5.x milestone on Feb 25, 2021
  6. modified the milestones: 5.x, TBD on Sep 1, 2022
  7. helgasoft commented on Jun 1, 2023

    @helgasoft

    not-a-bug
    A single visualMap cannot accommodate both series because of the different dimensions. Each series must have its own visualMap.
    Demo Code

  8. Justin-ZS commented on Jan 8, 2025

    @Justin-ZS
    Contributor

    not-a-bug A single visualMap cannot accommodate both series because of the different dimensions. Each series must have its own visualMap. Demo Code

    Hi, I have a similar problem.
    Adding the same visualMap for each series does render the correct color.
    But every visualMap has their own controller ...
    Is there any wat to show only one controller and control all visualmaps?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions