Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

265
Views
How to change bar width of a specific series while in different axis target - Angular google charts

I am developing a layered column chart using ComboChart on Angular google charts. Although I've separated two series of bar charts in two different axis, being able to find a bar in front of the other, like needed, I can't change the width of one of the series only. I want a result like the amCharts Layered Column Chart:

Layered Column Chart example

Right now, the chart looks like:

Current chart - Angular google charts

Also, if there is a way to share the same y axis while keeping one bar in front of the other, instead of staking then, it would be great.

The code I've been using for options of the angular google chart:

    this.options =
    {  
      colors: ['#1E90FF', '#f39800'], 
      hAxis: {
        title: 'haxisTitle',
        type: 'category'
      },
      vAxis:{
        title: 'Value',
        minValue: 0,
        format: this.numberFormat
      },
      seriesType: 'bars',
      bar: {1: {groupWidth: "30"}},
      series: 
        {
          0: {
            targetAxisIndex: 0
          },
          1: {
            targetAxisIndex: 1,
          }
        },        
      vAxes: {
        0: {
          title: 'Altered Value',
          label:'Altered Value',
          viewWindow: {  // <-- set view window
            min: 0,
            max: this.maxValue + 0.1*this.maxValue, // Sets the maximun value of altered or real value to the window size (both axis)
          },
          format: this.numberFormat,
          type: 'bars'     
        },
        1: {
          title: 'Real Value',
          label:'Real Value',
          viewWindow: {  // <-- set view window
            min: 0,
            max: this.maxValue + 0.1*this.maxValue,
          },
          format: this.numberFormat,
          type: 'bars'
        }    
      },
      aggregationTarget: 'auto',
      stackSeries: true,
      isStacked : true,
      explorer: {
        actions: ['dragToZoom', 'rightClickToReset'],
        keepInBounds: true,
        maxZoomIn: 4.0
      }
    };
  }

The chart shows the data correctly, the only problem is the layout.

Some reference that might help:

Google Developers - Visualization: Combo Chart amCharts Layered Column chart Overlapped bars - Stack overflow quote - Here the result was a stacked bar chart (something I don't want)

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!