Open extra topbar

Graph Scaling

If you are new here, please see some information on how to ask for support. Thank you!

Graph Scaling

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #8439
    jamiej
    Participant

    How Can i make the exchange grapgh responsive without using something like [wallets_exchange_chart width=”445″ height=”250″] ?

    #8441
    jamiej
    Participant

    i managed to achieve the responsive scaling i needed

    i changed the php in public_html/wp-content/plugins/wallets-exchange/templates/chart.php

    from
    <div class=”chart-container” style=”width:<?php echo absint( $atts[‘width’] ); ?>px;height:<?php echo absint( $atts[‘height’] ); ?>px;”></div>

    to
    <div class=”chart-container” style=”width:auto>px;height:<?php echo absint( $atts[‘height’] ); ?>px;”></div>
    <?php

    i see this works ok

    #8444
    alexg
    Keymaster

    Hello,

    Thank you for your contribution.

    You can always copy the file under your theme or child theme and edit it. For example, if you place the file into wp-content/themes/YOURTHEME/templates/wallets-exchange/chart.php, then you can edit it all you want and it will override the plugin’s template. For more details on this, see the documentation or the release notes for 5.0.0.

    However, you make a valid point. I can change the template so it outputs “auto” if no dimension is explicitly specified. This will go into the next release of the exchange.

    with regards

    #8468
    alexg
    Keymaster

    Now that version 1.3.0 of the Exchange extension is out, and the chart is implemented using your suggestion, the TradingView lightweight-charts library, the chart is now responsive if you do not specify width/height. When the window resizes, the charts are redrawn to the new available container size.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.