How to make Html NThinChartControl responsive


Author
Message
mouloud djamah
mouloud djamah
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
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. 
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.1K
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


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic
1 active, 1 guest, 0 members, 0 anonymous
No members currently viewing this topic!

Login

Explore
Messages
Mentions
Search