I reply to all queries on the forums and via email, once per day, Monday to Friday (not weekends).
If you are new here, please see some information on how to ask for support. Thank you!
-
AnonymousInactive
How Can i make the exchange grapgh responsive without using something like [wallets_exchange_chart width=”445″ height=”250″] ?
AnonymousInactive
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
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
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.
- You must be logged in to reply to this topic.