• Hi, I am really happy you created this plugin, it works great! I was wondering if it is possible to have an option built in to make this plugin output responsive layout etc.
    I was looking into stackoverflow on this and it seems possible but requires every chart to be customised with:

    <svg id=”chart” width=”960″ height=”500″
    viewBox=”0 0 960 500″
    preserveAspectRatio=”xMidYMid”>
    </svg>

    var aspect = 960 / 500,
    chart = $(“#chart”);
    $(window).on(“resize”, function() {
    var targetWidth = chart.parent().width();
    chart.attr(“width”, targetWidth);
    chart.attr(“height”, targetWidth / aspect);
    });

    So my question is how can this be used properly with your plugin?

    https://www.ads-software.com/plugins/wp-d3/

Viewing 1 replies (of 1 total)
  • Plugin Author Ruben

    (@figurebelow)

    Hi,
    I think what you propose is feasible, the only thing to consider is how to provide the width and height for the chart, and if it can be automatically calculated.
    I will look into this in the next plugin version ??

    Thanks for the feedback!.

Viewing 1 replies (of 1 total)
  • The topic ‘how to create responsive layouts’ is closed to new replies.