We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Angularjs Chart - Height and Width

Hi,
I don't seem to be able to set a Chart's height and width to 100% using angularjs

<div id="chart ej-chart e-size-height="100%" e-size-width="100%"><\div> this doesn't seem to make any difference, the height always seems to 450px (even if setting the value to a real height say 600)

Can you tell me how to set the height so that it takes 100% of the surrounding container.

Cheers ... Rob.

5 Replies

VA Vinothkumar Arumugam Syncfusion Team July 6, 2015 08:44 AM UTC

Hi Rob,

Sorry for the inconvenience caused.

We are able to reproduce the issue in 13.1.0.30 version. This issue has been fixed and it will be included in our upcoming Vol 2 Essential studio main release which is expect to be out on end of second week of July 2015.

Please let us know if you have any concern.

Thanks,

Vinothkumar Arumugam.



MM Matthias Max December 7, 2015 09:18 AM UTC

I have the same problem in v 13.3.0.12. This post is from July so I think it is resolved?

The chart is always 100% and 450px high no matter how i set it in Angular:
        vm.chartData = {
            //Initializing Series           
            series: [..],
            canResize: false,
            size: {
                height: 300, // Doesnt matter
                width: 300 // Doesnt matter
            }
        };


                <div ng-controller="MainController as main">
                    <div ej-chart="main.chartData"></div>
                </div>


VA Vinothkumar Arumugam Syncfusion Team December 8, 2015 09:05 AM UTC

Hi James,

Thanks for using Syncfusion products,

Currently we does not have support for 3D smartAxislabels. So we have logged a feature request for this “Support for smartAxisLabels in 3D”. A support incident to track the status of this feature has been created under your account. Please log on to our support website to check for further updates

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents

Please let us know if you have any concern.

Thanks,

Vinothkumar Arumugam.



VA Vinothkumar Arumugam Syncfusion Team December 8, 2015 09:08 AM UTC

Please ignore the previous updated.


VA Vinothkumar Arumugam Syncfusion Team December 8, 2015 12:12 PM UTC

Hi Matthias,

We have analyzed your query and found that in chartData model size settings given by numeric values but chart size values always take string format values. We have recommended for size values of the chart as string formats. Please find the  below sample formats for size height and width values .

                1.       height – “500” ,”500px” ,”100%”

                2.       width –“500”, “500px”, “50%”

below code snippet shows that.

Code Example:


Sample Image:


Please find the below link for download the sample.

Sample Link:

https://www.syncfusion.com/downloads/support/forum/119523/ze/Chart-1157859520

Please let us know if you have any queries.

Thanks,

Vinothkumar Arumugam.

 







Loader.
Up arrow icon