1. PROMO Subscribe our All Access Pass @ 75% OFF & access all our 16+ premium Divi extensions: Divi Block Pro, Carousel Toolkit, etc.LEARN MORE
Dismiss Notice
NEW Divi.Help Pro Carousel AI Toolkit - Magically turn your Divi design into carousel, simply by using our online toolkit. No plugins needed. Now it works with Divi 5 as well!Try our carousel AI toolkit
BEST Divi Block - A revolutionary drag & drop tool to easily mix & match 960+ premade blocks (Light & Dark) to kick start your Divi site design. Special module designs are included as well. Also newly added AI generator & color. Now it works with Divi 5 as well!
Learn More About Divi BlockFree Version ~ 340+ Free Blocks

Circle counter module - adjust thickness?

Discussion in 'Free Divi Community Forum' started by chris r, Oct 30, 2019.

  1. chris r

    chris r Member

    Hi,

    Is there any way to change the thickness of the pie/circle in the Circle counter module? I'm looking to make it about twice as thick as it is now. It looks like it uses canvas to create it, so I'm not sure if this can be overridden or not and I don't see options to do so in the Divi module itself.

    Any thoughts welcome...
     
    1. PRO MEMBER PERKS Divi Ultimate Header Plugin - Add custom vertical navigation for your Divi site. Turns into slide in menu on mobile:Learn More
  2. Divi.Help

    Divi.Help Administrator
    Staff Member

  3. chris r

    chris r Member

    That's kind of what I thought. Thanks for the support ref.
     
    1. PRO MEMBER PERKS Divi.Help Layout AI Generator - Try the power of AI to generate a custom Divi layout for you:Try Now
  4. Wilhelm

    Wilhelm New Member

    This was from years ago, but in case someone else lands here and was as frustrated as I was to find a fix... this is the most Elegant solution (pun intended). No idea why this couldn't be baked in... but let's move on...

    First thing I do is add a 'code' module to the space I want my circle counter. In that code module, paste this:


    <script type="text/javascript">

    (function($) {

    $(document).ready(function() {



    window.et_pb_circle_counter_init = function($the_counter, animate) {

    if ( 0 === $the_counter.width() ) {

    return;

    }



    $the_counter.easyPieChart({

    animate: {

    duration: 1800,

    enabled: true

    },

    size: 0 !== $the_counter.width() ? $the_counter.width() : 10,

    barColor: $the_counter.data( 'bar-bg-color' ),

    trackColor: $the_counter.data( 'color' ) || '#123123', //Change color of the background

    trackAlpha: $the_counter.data( 'alpha' ) || '1',

    scaleColor: false,

    lineWidth: 13, //Change thickness of the circle

    onStart: function() {

    $(this.el).find('.percent p').css({ 'visibility' : 'visible' });

    },

    onStep: function(from, to, percent) {

    $(this.el).find('.percent-value').text( Math.round( parseInt( percent ) ) );

    },

    onStop: function(from, to) {

    $(this.el).find('.percent-value').text( $(this.el).data('number-value') );

    }

    });

    }

    $et_pb_circle_counter = $( '.et_pb_circle_counter .et_pb_circle_counter_inner' );



    if ( $et_pb_circle_counter.length) {

    $( '.et_pb_circle_counter' ).each(function(){

    window.et_pb_circle_counter_init($(this).find('.et_pb_circle_counter_inner'));

    });

    }

    });

    })(jQuery)

    </script>

    Then you just change the lineWidth parameter, which is currently lucky number 13. Otherwise, you can style and modify the circle counter to your heart's content in its respective modules.

    Cheers!