Responsive Chart (Bootstrap)

2 posts, 0 answers
  1. KM
    KM avatar
    2 posts
    Member since:
    Aug 2007

    Posted 17 Aug Link to this post

    Hi,

    I am using Kendo RadialGauge inside Bootstrap response grid...

    The issue is how do I resize the gauge when the browser resize?

    Thank you.

    <div class="col-md-6">
                <div class="panel panel-primary copyright-wrap" id="xxx">
                    <div class="panel-heading">Sales Challenge
                        <button type="button" class="close" data-target="#salesChallenge" data-dismiss="alert"> <span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                    </div>
                    <div class="panel-body">
                        <div id="gauge-container">
                            @(Html.Kendo().RadialGauge()
                                .Name("gauge")
                                .Pointer(pointer => pointer.Value(65))
                                .Scale(scale => scale
                                    .MinorUnit(5)
                                    .StartAngle(-30)
                                    .EndAngle(210)
                                    .Max(180)
                                )
                            )

                        </div>                    
                    </div>                
                </div>
            </div>

     

  2. Stefan
    Admin
    Stefan avatar
    1394 posts

    Posted 21 Aug Link to this post

    Hello,

    The desired result can be achieved on the window resize event by applying the new width and height values and using the resize method of the RadialGauge. Please have in mind that custom logic has to be used to determine the new width and height values based on the window size:

    http://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/radialgauge#methods-resize

    I hope this is helpful.

    Regards,
    Stefan
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top