Size: (width and height)
See original GitHub issueHow do I set the width of the chart?
<chart width="150" type="StockChart" [options]="chartOptions" (load)="load" ></chart>
this doesn’t work
chartOptions = {
width: 150,
...
}
doesn’t work either
the only thing that changes the width from default’s 600 is setting it directly to the component (or via the style or class)
if I do
<chart class="col-xs-2" type="StockChart" [options]="chartOptions" (load)="load" ></chart>
where col-xs-2 is a bootstrap’s class or
<chart style="width:150px" type="StockChart" [options]="chartOptions" (load)="load" ></chart>
then it works…
I would like to set the chart’s size (width/height) dynamically if possible, like so:
<chart [width]="chartWidth" type="StockChart" [options]="chartOptions" (load)="load" ></chart>
so that when chartWidth changes the chart is redrawn
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:15 (4 by maintainers)
@shafaqkazmi try using a parent element with the size in this case is boostrap class
adding display: block to style, works for me. Thanks windmaomao