Skip to content

[Feature] eCharts: dataZoom only shows information for the first series if contains 2 serieses #19255

Closed

Description

@SincerelyUnique

What problem does this feature solve?

Hi Team sorry for bother you, I have a case, and I want to only display the first series line in the dataZoom bar (the shadow area that we dragged) , but now I found it always is the total of these two series, do you know how to specify the one fixed series in the dataZoom bar? please kindly help to check, thanks so much~~
You can put below code and replace to https://echarts.apache.org/examples/en/editor.html?c=line-stack

option = {
  title: {
    text: 'Stacked Line'
  },
  tooltip: {
    trigger: 'axis'
  },
  legend: {
    data: ['Email', 'Union Ads']
  },
  grid: {
    left: '3%',
    right: '4%',
    bottom: '10%',
    containLabel: true
  },
  toolbox: {
    feature: {
      saveAsImage: {}
    }
  },
  xAxis: {
    type: 'category',
    boundaryGap: false,
    data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
  },
  yAxis: {
    type: 'value'
  },
  dataZoom: [
    {
      type: 'slider',
      showDataShadow:true,
    },
    {
      type: 'inside'
    }
  ],
  series: [
    {
      name: 'Email',
      type: 'bar',
      stack: 'Total',
      data: [120, 132, 101, 134, 90, 230, 210]
    },
    {
      name: 'Union Ads',
      type: 'bar',
      stack: 'Total',
      data: [220, 182, 191, 134, 290, 230, 150]
    },
    
  ]
};

What does the proposed API look like?

I want to specify one fixed series line in the dataZoom bar, not the total, and not changed when I click or switch the legend, can you kindly help me to check?

Activity

  1. added
    en
    pending
    on Oct 29, 2023
  2. SincerelyUnique commented on Oct 29, 2023

    @SincerelyUnique
    Author

    I only want to show one shadow line and keep it fixed and not changing with switching legend

  3. Ovilia commented on Oct 30, 2023

    @Ovilia
    Contributor

    I think you have to make the series you want to put into the dataZoom with a different xAxis and yAxis. I've made a demo for you.

  4. added and removed
    pending
    on Oct 30, 2023
  5. SincerelyUnique commented on Nov 2, 2023

    @SincerelyUnique
    Author

    Thank you @Ovilia , your demo is very cool! that is what I want~ :)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    ensupporttopic: dataZoom

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions