This is a migrated thread and some comments may be shown as answers.

100% width issue

1 Answer 143 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
Indy
Top achievements
Rank 1
Veteran
Indy asked on 03 Jun 2020, 09:44 PM

Hi, I have a radHtmlChart and have set it to 100% height and width - but it does not seem to stretch.  It goes to a deafult value of about 800px

My code is below 

  <div id="Manufacturers" class="w3-container city" style="display:block; height:1800px; width:1800px; ">
     <telerik:RadHtmlChart runat="server" Transitions="true" Skin="Silk" Width="100%" Height="100%" ID="ChartManufacturers"   ChartTitle-Text="Car Manufacturers"            PlotArea-XAxis-DataLabelsField="Manufacturer" PlotArea-XAxis-LabelsAppearance-RotationAngle="50"   >
     <PlotArea>
         <Series>
             <telerik:ColumnSeries DataFieldY="Count" />
         </Series>
     </PlotArea>
     </telerik:RadHtmlChart>
  </div>

Any ideas as to why it does not strecth the full 100% - see attached pic of how it looks

Many thanks in advance

1 Answer, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 08 Jun 2020, 03:09 PM

Hi Indy,

Is the chart placed by any chnace into initially not visible parent? If so, you will need to call its repaint/redraw method just after it is made visible in order to force it to recalculate its size:

$find("ChartManufacturers").get_kendoWidget().redraw();

If this does not help, please, modify the attached page up to a point where the problem occurs and send it back to me for a further investigation.

Regards,
Vessy
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
Chart (HTML5)
Asked by
Indy
Top achievements
Rank 1
Veteran
Answers by
Vessy
Telerik team
Share this question
or