angularapexchartsng-apexcharts

How to set the width of the box in BoxPlot chart in Apex charts?


I am using apexcharts(version 3.35.3) in Angular project and want to set the width of the box. I have gone throught the documentation of the apexcharts and don't see any option to set the width of the box.

Is there any option to reduce the width of the box in BoxPlot chart? or any work around?

Ref Image: enter image description here


Solution

  • To solve it you have to add the plotOptions tag inside options and inside bar with the columnWidth property. By default the value is 70%

    plotOptions: {
        bar: {
          columnWidth: "40%"
          // columnWidth: "70%"
        }
      }
    

    Apexcharts documentation

    Codesandbox solution