JavaScript/jQuery Chart - size
Type:
Default Value: undefined
The UI component occupies its container's entire area by default. Use the size object to specify the UI component's size if it should be different from that of its container. Assign 0 to size object's height and width properties to hide the UI component.
index.js
- $(function() {
- $("#chartContainer").dxChart({
- // ...
- size: {
- height: 300,
- width: 600
- }
- });
- });
Alternatively, you can style the UI component's container using CSS:
index.js
styles.css
- $(function() {
- $("#chart").dxChart({
- // ...
- });
- });
- #chart {
- width: 85%;
- height: 70%;
- }
Feedback