Profile Picture

How to make Html NThinChartControl responsive

Posted By mouloud djamah 8 Years Ago
Author
Message
Nevron Support
Posted 8 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: 2 Weeks Ago
Posts: 3,054, Visits: 4,015
Hi Mouloud,
You cannot make the control responsive by resizing the client host div - the control will also have to update the size on the server and regenerate the chart image accordingly. We'll consider adding this feature in future releases.

Best Regards,
Nevron Support Team



mouloud djamah
Question Posted 8 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)

Group: Forum Members
Last Active: 8 Years Ago
Posts: 5, Visits: 48
Hi
How to make Html NThinChartControl responsive 
Using NThinChartControl component, the following Html is generating in the internet explorer :

<div id='NDataZoomToolExample' style='margin:0;padding:0;overflow:visible;position:relative;font-size:0px;width:400px;height:400px'><script type='text/javascript'>{var host = NClientNode.GetFromHtmlElement($("div[id = 'NDataZoomToolExample']")[0]);if (host == null) {
host = new NClientHost($("div[id = 'NDataZoomToolExample']")[0],"/NDataZoomToolExample/Service","",new NChartCommandProcessor(),new NRect(0, 0, 400, 399));;
var request = NRequest.GetUpdateScriptRequest();
host.ExecuteServiceRequest(request);
}
}</script></div>
                              
I am trying to make the NThinChartControl responsive by using the following javascript code:
<script>
    $(window).resize(function() {
        var element = document.getElementById("NDataZoomToolExample");
        if (element == null) return;
        element.style.width = "100%";
        element.style.height = "100%";
    });
</script>

But the NThinChartControl does not resize and the attribute values (of width and heigth) of html <div id='NDataZoomToolExample'> element don’t change.

Remark: The sample mvc project provided by Nevron has the same problem. The size of Html NThinChartControl doesn’t change. 



Similar Topics


Reading This Topic