vue-apexcharts icon indicating copy to clipboard operation
vue-apexcharts copied to clipboard

Chart goes out of the parent div

Open mreorhan opened this issue 5 years ago • 6 comments

When the page loaded first time, charts going out the div. chart And I cant change the height of charts. (like auto)

mreorhan avatar Jul 29 '19 13:07 mreorhan

Can you please create a minimal codesandbox demo of the issue?

junedchhipa avatar Aug 03 '19 11:08 junedchhipa

Can you please create a minimal codesandbox demo of the issue?

Im using with vuetify. So thats ready component. I didnt change anything. I couldnt create with codesandbox.

mreorhan avatar Aug 05 '19 07:08 mreorhan

Same problem here. I assume you also want to put your apexchart into a v-card such as in this short example:

<v-card>
    <v-card-title class="overline">
      {{ title }}
    </v-card-title>
    <v-card-text v-if="loaded">
    <apexchart :type="type" :options="options" :series="series"></apexchart>
    </v-card-text>
  </v-card>

Any suggestion about how to force the apexchart to always stay withing the v-card-text boundaries and completely fill its width/height?

ghost avatar Aug 28 '19 13:08 ghost

For the time being, here is a hacky workaround that worked for me:

Template:

 <v-col lg="3" md="6" cols="12" class="pt-0">
<!-- Using v-card classes in template -->
<!-- Class "pie" created to simulate cards behavior -->
          <div
            class="v-card v-card--link v-sheet v-sheet--tile theme--light pie"
            style="height:200px;max-height:200px;"
          >
             <apexchart type="pie" :options="chartOptions" :series="series"></apexchart>
          </div>

Style:

.pie:hover {
  box-shadow: 3px 3px 3px 3px rgb(177, 175, 175);
  transition: all 0.4s ease-out;
}

AhmedSHelmi avatar Mar 10 '20 08:03 AhmedSHelmi

OK I know It's been a while. Has anybody found a solution yet?

ludwig-loth avatar Aug 23 '21 15:08 ludwig-loth