Apexcharts.js: Scroll for bar chart

Created on 24 Apr 2019  路  3Comments  路  Source: apexcharts/apexcharts.js

### Problem

We have a large data set. We need to display this dataset with a bar chart. With the current features, the columns of the bar graph appear to be very narrow. Is it possible to add a scroll for the bar chart like this?
scrool_barchart

Most helpful comment

Any update on this? We too have large sets of data and would like to have a scrollbar in the chart area.

All 3 comments

Sorry, this feature is not available in the current version of ApexCharts.

Any update on this? We too have large sets of data and would like to have a scrollbar in the chart area.

Have an idea on how to solve this problem. Not a great solution, but it works. In the height propery I just calculate the length of my array and multiply for the height I want for each bar:

this.options = {
    chart: {
        height: array.length * 20,
        ...
    },
    ...
}

Then, I wrapped my chart in a div with a fixed height and the scroll property set to auto:

<div class="graphic-container">
    <!-- Your chart goes here -->
</div>

The graphic-container class only have this:

.graphic-container {
  min-height: 300px;
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
}

Voil谩

image

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pribilinskiy picture pribilinskiy  路  3Comments

Bilge picture Bilge  路  3Comments

Sumon-miazi picture Sumon-miazi  路  3Comments

piyushSinghalDemo picture piyushSinghalDemo  路  3Comments

georgehardy picture georgehardy  路  3Comments