Is it possible to add Owlcarousel to Highcharts?

Asked

Viewed 116 times

0

I have a slider made by OwlCarousel I want you to run pizza graphics rendered by HighCharts. I mean, I have 4 pie charts With subtitles, and I want you to play 4 pies, also without the legend only in Mobile.

fiddle: http://jsfiddle.net/pedropcruz/0hv2cjjz/23/

1 answer

1

Yes, it’s possible, you’re already working with div's, just put them all inside one another div and add the class that create that effect....

USING THE FLICKITY

<div class="main-gallery">
    <div id="DonuTchartIBV-MMS-1" class="donut gallery-cell"></div>
    ...
    <div id="" class="gallery-cell"></div>
</div>

And of course, load the required libraries and add the following line into your file .js:

$('.main-gallery').flickity({
  cellAlign: 'left',
  contain: true
});

jsFiddle from the example using flickity

USING THE OWLCAROUSEL

<div id="owl-example" class="owl-carousel">
    <div id="DonuTchartIBV-MMS-1" class="donut"></div>
    ...
    <div></div>
</div>

Load the libraries: Theme.css, Carousel.css, Carousel.js necessary and add the following line to your file .js:

$(document).ready(function() {
  $("#owl-example").owlCarousel();
});

jsFiddle from the example using Owlcarousel

  • I got through, but I’m using different slides, and I found Owl Carousel more effective. I managed to get it working, but it does not show me the charts and I do not understand why. I can share my question here?

  • edited, make yourself understood. it’s a little difficult to explain to me.

  • Kind of like this one I have in print: http://prntscr.com/7co09m Actually, everything is fine. But when I write the charts (Highcharts) it doesn’t move the slider (and has autoplay: 1000) and there are no effects or anything. Only when I resize it acts normally. I wanted him to have that div in that "display" he write the graphics and put the Owlcarousel. I’ll try to expose in the fiddle and I’ll show you :)

  • Shows the graphics, the values I have in the middle and the slider. But all stopped, without any kind of animation.

  • I have and also commented. It’s hard to explain to me.

  • Well, I’m doing two highcharts, but actually the same changing just the fact that I have Legend or not. see my fiddle, can’t figure out where I’m missing... http://jsfiddle.net/pedropcruz/7xs5t848/4/

  • I believe that the error is in the graph, not in the Carousel..... I will take a look at your fiddle, see if I find the error

  • Highcharts works normally without the slider?

  • yes it works! To understand what happens to me: http://prntscr.com/7cph59 If you make a resize: http://prntscr.com/7cphef that is, you are already doing well

  • have to put in the fiddle only the part of the graph?

  • Yes you are already on fiddle! https://jsfiddle.net/pedropcruz/7xs5t848/4/

Show 6 more comments

Browser other questions tagged

You are not signed in. Login or sign up in order to post.