JavaScript/jQuery PieChart - margin
Type:
jQuery
index.js
$(function() { $("#pieChartContainer").dxPieChart({ // ... margin: { top: 20, bottom: 20, left: 30, right: 30 } }); });
Angular
app.component.html
app.component.ts
app.module.ts
<dx-pie-chart ... > <dxo-margin [top]="20" [bottom]="20" [left]="30" [right]="30"> </dxo-margin> </dx-pie-chart>
import { Component } from '@angular/core'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent { // ... }
import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { AppComponent } from './app.component'; import { DxPieChartModule } from 'devextreme-angular'; @NgModule({ declarations: [ AppComponent ], imports: [ BrowserModule, DxPieChartModule ], providers: [ ], bootstrap: [AppComponent] }) export class AppModule { }
Vue
App.vue
<template> <DxPieChart ... > <DxMargin :top="20" :bottom="20" :left="30" :right="30" /> </DxPieChart> </template> <script> import 'devextreme/dist/css/dx.light.css'; import DxPieChart, { DxMargin } from 'devextreme-vue/pie-chart'; export default { components: { DxPieChart, DxMargin }, // ... } </script>
React
App.js
import React from 'react'; import 'devextreme/dist/css/dx.light.css'; import PieChart, { Margin } from 'devextreme-react/pie-chart'; class App extends React.Component { render() { return ( <PieChart ... > <Margin top={20} bottom={20} left={30} right={30} /> </PieChart> ); } } export default App;
Feedback