0
this.options = {
      chart: {
          type: 'linePlusBarChart',
          height: 500,
          margin: {
              top: 30,
              right: 75,
              bottom: 50,
              left: 75
          },
          bars: {
              forceY: [0]
          },
          bars2: {
              forceY: [0]
          },
          color: ['#2ca02c', 'darkred'],
          x: function(d, i) { return i; },
          xAxis: {
              axisLabel: 'X Axis',
              tickFormat: (d) => {
                  let dx = this.data[0].values[d] && this.data[0].values[d].x || 0;
                  return dx;
              }
          },
          x2Axis: {
              tickFormat: (d) => {
                  let dx = this.data[0].values[d] && this.data[0].values[d].x || 0;
                  return dx;
              },
              showMaxMin: false
          },
          y1Axis: {
              axisLabel: 'Y1 Axis',
              tickFormat: function(d){
                  return d3.format(',f')(d);
              },
              axisLabelDistance: 12
          },
          y2Axis: {
              axisLabel: 'TargetLine Axis',
              rotateLabels: -35,
          }
      }
    };

I want to set y1Axis range explicitly something like 1 to 100. How can I do that?

In documentation of d3 I've found tickValues But I'm not sure how I can use this method into above configuration object.

Thanks in advance for any kind of help.

1 Answers1

0

Found the answer. Just for further reference if someone needs that later.

lines: { 
    // for line chart
    forceY: [0, 100]
},

No need to change y1Axis because it's used by lines. so if we just force line to follow any guidelines for y-axis it'll do the trick.