Numeric axis in Vue 3D Chart component
13 Jun 202424 minutes to read
The numeric axis can be used to represent the numeric values of data in 3D chart. By default, the valueType of an axis is Double.
<template>
<div id="app">
<ejs-chart3d id="container" :primaryXAxis="primaryXAxis" :wallColor='wallColor' :enableRotation='enableRotation'
:rotation='rotation' :tilt='tilt' :depth='depth'>
<e-chart3d-series-collection>
<e-chart3d-series :dataSource="seriesData" type="Column" xName="x" yName="y" columnSpacing=0.1></e-chart3d-series>
</e-chart3d-series-collection>
</ejs-chart3d>
</div>
</template>
<script setup>
import { provide } from "vue";
import { Chart3DComponent as EjsChart3d, Chart3DSeriesCollectionDirective as EChart3dSeriesCollection, Chart3DSeriesDirective as EChart3dSeries, ColumnSeries3D } from '@syncfusion/ej2-vue-charts';
const seriesData = [
{ x: 1, y: 7 }, { x: 2, y: 1 }, { x: 3, y: 1 }, { x: 4, y: 14 }, { x: 5, y: 1 }, { x: 6, y: 10 },
{ x: 7, y: 8 }, { x: 8, y: 6 }, { x: 9, y: 10 }, { x: 10, y: 10 }, { x: 11, y: 16 }, { x: 12, y: 6 },
{ x: 13, y: 14 }, { x: 14, y: 7 }, { x: 15, y: 5 }, { x: 16, y: 2 }, { x: 17, y: 14 }, { x: 18, y: 7 },
{ x: 19, y: 7 }, { x: 20, y: 10 }
];
const primaryXAxis = {
valueType: 'Double'
};
const wallColor = 'transparent';
const enableRotation = true;
const rotation = 7;
const tilt = 10;
const depth = 100;
provide('chart3d', [ColumnSeries3D]);
</script>
<style>
#container {
height: 350px;
}
</style><template>
<div id="app">
<ejs-chart3d id="container" :primaryXAxis="primaryXAxis" :wallColor='wallColor' :enableRotation='enableRotation'
:rotation='rotation' :tilt='tilt' :depth='depth'>
<e-chart3d-series-collection>
<e-chart3d-series :dataSource="seriesData" type="Column" xName="x" yName="y" columnSpacing=0.1></e-chart3d-series>
</e-chart3d-series-collection>
</ejs-chart3d>
</div>
</template>
<script>
import { Chart3DComponent, Chart3DSeriesCollectionDirective, Chart3DSeriesDirective, ColumnSeries3D } from '@syncfusion/ej2-vue-charts';
export default {
name: "App",
components: {
'ejs-chart3d': Chart3DComponent,
'e-chart3d-series-collection': Chart3DSeriesCollectionDirective,
'e-chart3d-series': Chart3DSeriesDirective
},
data() {
return {
seriesData: [
{ x: 1, y: 7 }, { x: 2, y: 1 }, { x: 3, y: 1 }, { x: 4, y: 14 }, { x: 5, y: 1 }, { x: 6, y: 10 },
{ x: 7, y: 8 }, { x: 8, y: 6 }, { x: 9, y: 10 }, { x: 10, y: 10 }, { x: 11, y: 16 }, { x: 12, y: 6 },
{ x: 13, y: 14 }, { x: 14, y: 7 }, { x: 15, y: 5 }, { x: 16, y: 2 }, { x: 17, y: 14 }, { x: 18, y: 7 },
{ x: 19, y: 7 }, { x: 20, y: 10 }
],
primaryXAxis: {
valueType: 'Double'
},
wallColor: 'transparent',
enableRotation: true,
rotation: 7,
tilt: 10,
depth: 100
};
},
provide: {
chart3d: [ColumnSeries3D]
}
};
</script>
<style>
#container {
height: 350px;
}
</style>Range
The range of an axis will be calculated automatically based on the provided data, and it can also be customized by using the minimum, maximum and interval properties of the axis.
<template>
<div id="app">
<ejs-chart3d id="container" :primaryXAxis="primaryXAxis" :wallColor='wallColor' :enableRotation='enableRotation'
:rotation='rotation' :tilt='tilt' :depth='depth'>
<e-chart3d-series-collection>
<e-chart3d-series :dataSource="seriesData" type="Column" xName="x" yName="y" columnSpacing=0.1></e-chart3d-series>
</e-chart3d-series-collection>
</ejs-chart3d>
</div>
</template>
<script setup>
import { provide } from "vue";
import { Chart3DComponent as EjsChart3d, Chart3DSeriesCollectionDirective as EChart3dSeriesCollection, Chart3DSeriesDirective as EChart3dSeries, ColumnSeries3D } from '@syncfusion/ej2-vue-charts';
const seriesData = [
{ x: 1, y: 7 }, { x: 2, y: 1 }, { x: 3, y: 1 }, { x: 4, y: 14 }, { x: 5, y: 1 }, { x: 6, y: 10 },
{ x: 7, y: 8 }, { x: 8, y: 6 }, { x: 9, y: 10 }, { x: 10, y: 10 }, { x: 11, y: 16 }, { x: 12, y: 6 },
{ x: 13, y: 14 }, { x: 14, y: 7 }, { x: 15, y: 5 }, { x: 16, y: 2 }, { x: 17, y: 14 }, { x: 18, y: 7 },
{ x: 19, y: 7 }, { x: 20, y: 10 }
];
const primaryXAxis = {
valueType: 'Double',
minimum: 1,
maximum: 20,
interval: 5
};
const wallColor = 'transparent';
const enableRotation = true;
const rotation = 7;
const tilt = 10;
const depth = 100;
provide('chart3d', [ColumnSeries3D]);
</script>
<style>
#container {
height: 350px;
}
</style><template>
<div id="app">
<ejs-chart3d id="container" :primaryXAxis="primaryXAxis" :wallColor='wallColor' :enableRotation='enableRotation'
:rotation='rotation' :tilt='tilt' :depth='depth'>
<e-chart3d-series-collection>
<e-chart3d-series :dataSource="seriesData" type="Column" xName="x" yName="y" columnSpacing=0.1></e-chart3d-series>
</e-chart3d-series-collection>
</ejs-chart3d>
</div>
</template>
<script>
import { Chart3DComponent, Chart3DSeriesCollectionDirective, Chart3DSeriesDirective, ColumnSeries3D } from '@syncfusion/ej2-vue-charts';
export default {
name: "App",
components: {
'ejs-chart3d': Chart3DComponent,
'e-chart3d-series-collection': Chart3DSeriesCollectionDirective,
'e-chart3d-series': Chart3DSeriesDirective
},
data() {
return {
seriesData: [
{ x: 1, y: 7 }, { x: 2, y: 1 }, { x: 3, y: 1 }, { x: 4, y: 14 }, { x: 5, y: 1 }, { x: 6, y: 10 },
{ x: 7, y: 8 }, { x: 8, y: 6 }, { x: 9, y: 10 }, { x: 10, y: 10 }, { x: 11, y: 16 }, { x: 12, y: 6 },
{ x: 13, y: 14 }, { x: 14, y: 7 }, { x: 15, y: 5 }, { x: 16, y: 2 }, { x: 17, y: 14 }, { x: 18, y: 7 },
{ x: 19, y: 7 }, { x: 20, y: 10 }
],
primaryXAxis: {
valueType: 'Double',
minimum: 1,
maximum: 20,
interval: 5
},
wallColor: 'transparent',
enableRotation: true,
rotation: 7,
tilt: 10,
depth: 100
};
},
provide: {
chart3d: [ColumnSeries3D]
}
};
</script>
<style>
#container {
height: 350px;
}
</style>Range padding
Padding can be applied to the minimum and maximum extremes of an axis range by using the rangePadding property. Numeric axis supports the following types of padding.
- None
- Round
- Additional
- Normal
- Auto
Numeric - None
When the rangePadding is set to None, minimum and maximum of the axis is based on the data.
<template>
<div id="app">
<ejs-chart3d id="container" :primaryXAxis="primaryXAxis" :primaryYAxis="primaryYAxis" :wallColor='wallColor'
:enableRotation='enableRotation' :rotation='rotation' :tilt='tilt' :depth='depth'>
<e-chart3d-series-collection>
<e-chart3d-series :dataSource="seriesData" type="Column" xName="x" yName="y" columnSpacing=0.1></e-chart3d-series>
</e-chart3d-series-collection>
</ejs-chart3d>
</div>
</template>
<script setup>
import { provide } from "vue";
import { Chart3DComponent as EjsChart3d, Chart3DSeriesCollectionDirective as EChart3dSeriesCollection, Chart3DSeriesDirective as EChart3dSeries, ColumnSeries3D } from '@syncfusion/ej2-vue-charts';
const seriesData = [
{ x: 1, y: 7 }, { x: 2, y: 1 }, { x: 3, y: 1 }, { x: 4, y: 14 }, { x: 5, y: 1 }, { x: 6, y: 10 },
{ x: 7, y: 8 }, { x: 8, y: 6 }, { x: 9, y: 10 }, { x: 10, y: 10 }, { x: 11, y: 16 }, { x: 12, y: 6 },
{ x: 13, y: 14 }, { x: 14, y: 7 }, { x: 15, y: 5 }, { x: 16, y: 2 }, { x: 17, y: 14 }, { x: 18, y: 7 },
{ x: 19, y: 7 }, { x: 20, y: 10 }
];
const primaryXAxis = {
valueType: 'Double'
};
const primaryYAxis = {
rangePadding: 'None'
};
const wallColor = 'transparent';
const enableRotation = true;
const rotation = 7;
const tilt = 10;
const depth = 100;
provide('chart3d', [ColumnSeries3D]);
</script>
<style>
#container {
height: 350px;
}
</style><template>
<div id="app">
<ejs-chart3d id="container" :primaryXAxis="primaryXAxis" :primaryYAxis="primaryYAxis" :wallColor='wallColor'
:enableRotation='enableRotation' :rotation='rotation' :tilt='tilt' :depth='depth'>
<e-chart3d-series-collection>
<e-chart3d-series :dataSource="seriesData" type="Column" xName="x" yName="y" columnSpacing=0.1></e-chart3d-series>
</e-chart3d-series-collection>
</ejs-chart3d>
</div>
</template>
<script>
import { Chart3DComponent, Chart3DSeriesCollectionDirective, Chart3DSeriesDirective, ColumnSeries3D } from '@syncfusion/ej2-vue-charts';
export default {
name: "App",
components: {
'ejs-chart3d': Chart3DComponent,
'e-chart3d-series-collection': Chart3DSeriesCollectionDirective,
'e-chart3d-series': Chart3DSeriesDirective
},
data() {
return {
seriesData: [
{ x: 1, y: 7 }, { x: 2, y: 1 }, { x: 3, y: 1 }, { x: 4, y: 14 }, { x: 5, y: 1 }, { x: 6, y: 10 },
{ x: 7, y: 8 }, { x: 8, y: 6 }, { x: 9, y: 10 }, { x: 10, y: 10 }, { x: 11, y: 16 }, { x: 12, y: 6 },
{ x: 13, y: 14 }, { x: 14, y: 7 }, { x: 15, y: 5 }, { x: 16, y: 2 }, { x: 17, y: 14 }, { x: 18, y: 7 },
{ x: 19, y: 7 }, { x: 20, y: 10 }
],
primaryXAxis: {
valueType: 'Double'
},
primaryYAxis: {
rangePadding: 'None'
},
wallColor: 'transparent',
enableRotation: true,
rotation: 7,
tilt: 10,
depth: 100
};
},
provide: {
chart3d: [ColumnSeries3D]
}
};
</script>
<style>
#container {
height: 350px;
}
</style>Numeric - Round
When the rangePadding is set to Round, minimum and maximum will be rounded to the nearest possible value, which is divisible by interval. For example, when the minimum is 3.5 and the interval is 1, then the minimum will be rounded to 3.
<template>
<div id="app">
<ejs-chart3d id="container" :primaryXAxis="primaryXAxis" :primaryYAxis="primaryYAxis" :wallColor='wallColor'
:enableRotation='enableRotation' :rotation='rotation' :tilt='tilt' :depth='depth'>
<e-chart3d-series-collection>
<e-chart3d-series :dataSource="seriesData" type="Column" xName="x" yName="y" columnSpacing=0.1></e-chart3d-series>
</e-chart3d-series-collection>
</ejs-chart3d>
</div>
</template>
<script setup>
import { provide } from "vue";
import { Chart3DComponent as EjsChart3d, Chart3DSeriesCollectionDirective as EChart3dSeriesCollection, Chart3DSeriesDirective as EChart3dSeries, ColumnSeries3D } from '@syncfusion/ej2-vue-charts';
const seriesData = [
{ x: 1, y: 7 }, { x: 2, y: 1 }, { x: 3, y: 1 }, { x: 4, y: 14 }, { x: 5, y: 1 }, { x: 6, y: 10 },
{ x: 7, y: 8 }, { x: 8, y: 6 }, { x: 9, y: 10 }, { x: 10, y: 10 }, { x: 11, y: 16 }, { x: 12, y: 6 },
{ x: 13, y: 14 }, { x: 14, y: 7 }, { x: 15, y: 5 }, { x: 16, y: 2 }, { x: 17, y: 14 }, { x: 18, y: 7 },
{ x: 19, y: 7 }, { x: 20, y: 10 }
];
const primaryXAxis = {
valueType: 'Double'
};
const primaryYAxis = {
rangePadding: 'Round'
};
const wallColor = 'transparent';
const enableRotation = true;
const rotation = 7;
const tilt = 10;
const depth = 100;
provide('chart3d', [ColumnSeries3D]);
</script>
<style>
#container {
height: 350px;
}
</style><template>
<div id="app">
<ejs-chart3d id="container" :primaryXAxis="primaryXAxis" :primaryYAxis="primaryYAxis" :wallColor='wallColor'
:enableRotation='enableRotation' :rotation='rotation' :tilt='tilt' :depth='depth'>
<e-chart3d-series-collection>
<e-chart3d-series :dataSource="seriesData" type="Column" xName="x" yName="y" columnSpacing=0.1></e-chart3d-series>
</e-chart3d-series-collection>
</ejs-chart3d>
</div>
</template>
<script>
import { Chart3DComponent, Chart3DSeriesCollectionDirective, Chart3DSeriesDirective, ColumnSeries3D } from '@syncfusion/ej2-vue-charts';
export default {
name: "App",
components: {
'ejs-chart3d': Chart3DComponent,
'e-chart3d-series-collection': Chart3DSeriesCollectionDirective,
'e-chart3d-series': Chart3DSeriesDirective
},
data() {
return {
seriesData: [
{ x: 1, y: 7 }, { x: 2, y: 1 }, { x: 3, y: 1 }, { x: 4, y: 14 }, { x: 5, y: 1 }, { x: 6, y: 10 },
{ x: 7, y: 8 }, { x: 8, y: 6 }, { x: 9, y: 10 }, { x: 10, y: 10 }, { x: 11, y: 16 }, { x: 12, y: 6 },
{ x: 13, y: 14 }, { x: 14, y: 7 }, { x: 15, y: 5 }, { x: 16, y: 2 }, { x: 17, y: 14 }, { x: 18, y: 7 },
{ x: 19, y: 7 }, { x: 20, y: 10 }
],
primaryXAxis: {
valueType: 'Double'
},
primaryYAxis: {
rangePadding: 'Round'
},
wallColor: 'transparent',
enableRotation: true,
rotation: 7,
tilt: 10,
depth: 100
};
},
provide: {
chart3d: [ColumnSeries3D]
}
};
</script>
<style>
#container {
height: 350px;
}
</style>Numeric - Additional
When the rangePadding is set to Additional, interval of an axis will be added to the minimum and maximum of the axis.
<template>
<div id="app">
<ejs-chart3d id="container" :primaryXAxis="primaryXAxis" :primaryYAxis="primaryYAxis" :wallColor='wallColor'
:enableRotation='enableRotation' :rotation='rotation' :tilt='tilt' :depth='depth'>
<e-chart3d-series-collection>
<e-chart3d-series :dataSource="seriesData" type="Column" xName="x" yName="y" columnSpacing=0.1></e-chart3d-series>
</e-chart3d-series-collection>
</ejs-chart3d>
</div>
</template>
<script setup>
import { provide } from "vue";
import { Chart3DComponent as EjsChart3d, Chart3DSeriesCollectionDirective as EChart3dSeriesCollection, Chart3DSeriesDirective as EChart3dSeries, ColumnSeries3D } from '@syncfusion/ej2-vue-charts';
const seriesData = [
{ x: 1, y: 7 }, { x: 2, y: 1 }, { x: 3, y: 1 }, { x: 4, y: 14 }, { x: 5, y: 1 }, { x: 6, y: 10 },
{ x: 7, y: 8 }, { x: 8, y: 6 }, { x: 9, y: 10 }, { x: 10, y: 10 }, { x: 11, y: 16 }, { x: 12, y: 6 },
{ x: 13, y: 14 }, { x: 14, y: 7 }, { x: 15, y: 5 }, { x: 16, y: 2 }, { x: 17, y: 14 }, { x: 18, y: 7 },
{ x: 19, y: 7 }, { x: 20, y: 10 }
];
const primaryXAxis = {
valueType: 'Double'
};
const primaryYAxis = {
rangePadding: 'Additional'
};
const wallColor = 'transparent';
const enableRotation = true;
const rotation = 7;
const tilt = 10;
const depth = 100;
provide('chart3d', [ColumnSeries3D]);
</script>
<style>
#container {
height: 350px;
}
</style><template>
<div id="app">
<ejs-chart3d id="container" :primaryXAxis="primaryXAxis" :primaryYAxis="primaryYAxis" :wallColor='wallColor'
:enableRotation='enableRotation' :rotation='rotation' :tilt='tilt' :depth='depth'>
<e-chart3d-series-collection>
<e-chart3d-series :dataSource="seriesData" type="Column" xName="x" yName="y" columnSpacing=0.1></e-chart3d-series>
</e-chart3d-series-collection>
</ejs-chart3d>
</div>
</template>
<script>
import { Chart3DComponent, Chart3DSeriesCollectionDirective, Chart3DSeriesDirective, ColumnSeries3D } from '@syncfusion/ej2-vue-charts';
export default {
name: "App",
components: {
'ejs-chart3d': Chart3DComponent,
'e-chart3d-series-collection': Chart3DSeriesCollectionDirective,
'e-chart3d-series': Chart3DSeriesDirective
},
data() {
return {
seriesData: [
{ x: 1, y: 7 }, { x: 2, y: 1 }, { x: 3, y: 1 }, { x: 4, y: 14 }, { x: 5, y: 1 }, { x: 6, y: 10 },
{ x: 7, y: 8 }, { x: 8, y: 6 }, { x: 9, y: 10 }, { x: 10, y: 10 }, { x: 11, y: 16 }, { x: 12, y: 6 },
{ x: 13, y: 14 }, { x: 14, y: 7 }, { x: 15, y: 5 }, { x: 16, y: 2 }, { x: 17, y: 14 }, { x: 18, y: 7 },
{ x: 19, y: 7 }, { x: 20, y: 10 }
],
primaryXAxis: {
valueType: 'Double'
},
primaryYAxis: {
rangePadding: 'Additional'
},
wallColor: 'transparent',
enableRotation: true,
rotation: 7,
tilt: 10,
depth: 100
};
},
provide: {
chart3d: [ColumnSeries3D]
}
};
</script>
<style>
#container {
height: 350px;
}
</style>Numeric - Normal
When the rangePadding is set to Normal, padding is applied to the axis based on default range calculation.
<template>
<div id="app">
<ejs-chart3d id="container" :primaryXAxis="primaryXAxis" :primaryYAxis="primaryYAxis" :wallColor='wallColor'
:enableRotation='enableRotation' :rotation='rotation' :tilt='tilt' :depth='depth'>
<e-chart3d-series-collection>
<e-chart3d-series :dataSource="seriesData" type="Column" xName="x" yName="y" columnSpacing=0.1></e-chart3d-series>
</e-chart3d-series-collection>
</ejs-chart3d>
</div>
</template>
<script setup>
import { provide } from "vue";
import { Chart3DComponent as EjsChart3d, Chart3DSeriesCollectionDirective as EChart3dSeriesCollection, Chart3DSeriesDirective as EChart3dSeries, ColumnSeries3D } from '@syncfusion/ej2-vue-charts';
const seriesData = [
{ x: 1, y: 7 }, { x: 2, y: 1 }, { x: 3, y: 1 }, { x: 4, y: 14 }, { x: 5, y: 1 }, { x: 6, y: 10 },
{ x: 7, y: 8 }, { x: 8, y: 6 }, { x: 9, y: 10 }, { x: 10, y: 10 }, { x: 11, y: 16 }, { x: 12, y: 6 },
{ x: 13, y: 14 }, { x: 14, y: 7 }, { x: 15, y: 5 }, { x: 16, y: 2 }, { x: 17, y: 14 }, { x: 18, y: 7 },
{ x: 19, y: 7 }, { x: 20, y: 10 }
];
const primaryXAxis = {
valueType: 'Double'
};
const primaryYAxis = {
rangePadding: 'Normal'
};
const wallColor = 'transparent';
const enableRotation = true;
const rotation = 7;
const tilt = 10;
const depth = 100;
provide('chart3d', [ColumnSeries3D]);
</script>
<style>
#container {
height: 350px;
}
</style><template>
<div id="app">
<ejs-chart3d id="container" :primaryXAxis="primaryXAxis" :primaryYAxis="primaryYAxis" :wallColor='wallColor'
:enableRotation='enableRotation' :rotation='rotation' :tilt='tilt' :depth='depth'>
<e-chart3d-series-collection>
<e-chart3d-series :dataSource="seriesData" type="Column" xName="x" yName="y" columnSpacing=0.1></e-chart3d-series>
</e-chart3d-series-collection>
</ejs-chart3d>
</div>
</template>
<script>
import { Chart3DComponent, Chart3DSeriesCollectionDirective, Chart3DSeriesDirective, ColumnSeries3D } from '@syncfusion/ej2-vue-charts';
export default {
name: "App",
components: {
'ejs-chart3d': Chart3DComponent,
'e-chart3d-series-collection': Chart3DSeriesCollectionDirective,
'e-chart3d-series': Chart3DSeriesDirective
},
data() {
return {
seriesData: [
{ x: 1, y: 7 }, { x: 2, y: 1 }, { x: 3, y: 1 }, { x: 4, y: 14 }, { x: 5, y: 1 }, { x: 6, y: 10 },
{ x: 7, y: 8 }, { x: 8, y: 6 }, { x: 9, y: 10 }, { x: 10, y: 10 }, { x: 11, y: 16 }, { x: 12, y: 6 },
{ x: 13, y: 14 }, { x: 14, y: 7 }, { x: 15, y: 5 }, { x: 16, y: 2 }, { x: 17, y: 14 }, { x: 18, y: 7 },
{ x: 19, y: 7 }, { x: 20, y: 10 }
],
primaryXAxis: {
valueType: 'Double'
},
primaryYAxis: {
rangePadding: 'Normal'
},
wallColor: 'transparent',
enableRotation: true,
rotation: 7,
tilt: 10,
depth: 100
};
},
provide: {
chart3d: [ColumnSeries3D]
}
};
</script>
<style>
#container {
height: 350px;
}
</style>Numeric - Auto
When the rangePadding is set to Auto, horizontal numeric axis takes None as padding calculation, while the vertical numeric axis takes Normal as padding calculation.
<template>
<div id="app">
<ejs-chart3d id="container" :primaryXAxis="primaryXAxis" :primaryYAxis="primaryYAxis" :wallColor='wallColor'
:enableRotation='enableRotation' :rotation='rotation' :tilt='tilt' :depth='depth'>
<e-chart3d-series-collection>
<e-chart3d-series :dataSource="seriesData" type="Column" xName="x" yName="y" columnSpacing=0.1></e-chart3d-series>
</e-chart3d-series-collection>
</ejs-chart3d>
</div>
</template>
<script setup>
import { provide } from "vue";
import { Chart3DComponent as EjsChart3d, Chart3DSeriesCollectionDirective as EChart3dSeriesCollection, Chart3DSeriesDirective as EChart3dSeries, ColumnSeries3D } from '@syncfusion/ej2-vue-charts';
const seriesData = [
{ x: 1, y: 7 }, { x: 2, y: 1 }, { x: 3, y: 1 }, { x: 4, y: 14 }, { x: 5, y: 1 }, { x: 6, y: 10 },
{ x: 7, y: 8 }, { x: 8, y: 6 }, { x: 9, y: 10 }, { x: 10, y: 10 }, { x: 11, y: 16 }, { x: 12, y: 6 },
{ x: 13, y: 14 }, { x: 14, y: 7 }, { x: 15, y: 5 }, { x: 16, y: 2 }, { x: 17, y: 14 }, { x: 18, y: 7 },
{ x: 19, y: 7 }, { x: 20, y: 10 }
];
const primaryXAxis = {
valueType: 'Double',
rangePadding: 'Auto'
};
const primaryYAxis = {
rangePadding: 'Auto'
};
const wallColor = 'transparent';
const enableRotation = true;
const rotation = 7;
const tilt = 10;
const depth = 100;
provide('chart3d', [ColumnSeries3D]);
</script>
<style>
#container {
height: 350px;
}
</style><template>
<div id="app">
<ejs-chart3d id="container" :primaryXAxis="primaryXAxis" :primaryYAxis="primaryYAxis" :wallColor='wallColor'
:enableRotation='enableRotation' :rotation='rotation' :tilt='tilt' :depth='depth'>
<e-chart3d-series-collection>
<e-chart3d-series :dataSource="seriesData" type="Column" xName="x" yName="y" columnSpacing=0.1></e-chart3d-series>
</e-chart3d-series-collection>
</ejs-chart3d>
</div>
</template>
<script>
import { Chart3DComponent, Chart3DSeriesCollectionDirective, Chart3DSeriesDirective, ColumnSeries3D } from '@syncfusion/ej2-vue-charts';
export default {
name: "App",
components: {
'ejs-chart3d': Chart3DComponent,
'e-chart3d-series-collection': Chart3DSeriesCollectionDirective,
'e-chart3d-series': Chart3DSeriesDirective
},
data() {
return {
seriesData: [
{ x: 1, y: 7 }, { x: 2, y: 1 }, { x: 3, y: 1 }, { x: 4, y: 14 }, { x: 5, y: 1 }, { x: 6, y: 10 },
{ x: 7, y: 8 }, { x: 8, y: 6 }, { x: 9, y: 10 }, { x: 10, y: 10 }, { x: 11, y: 16 }, { x: 12, y: 6 },
{ x: 13, y: 14 }, { x: 14, y: 7 }, { x: 15, y: 5 }, { x: 16, y: 2 }, { x: 17, y: 14 }, { x: 18, y: 7 },
{ x: 19, y: 7 }, { x: 20, y: 10 }
],
primaryXAxis: {
valueType: 'Double',
rangePadding: 'Auto'
},
primaryYAxis: {
rangePadding: 'Auto'
},
wallColor: 'transparent',
enableRotation: true,
rotation: 7,
tilt: 10,
depth: 100
};
},
provide: {
chart3d: [ColumnSeries3D]
}
};
</script>
<style>
#container {
height: 350px;
}
</style>Label format
Numeric label format
Numeric labels can be formatted by using the labelFormat property. Also, it supports all globalize format.
<template>
<div id="app">
<ejs-chart3d id="container" :primaryXAxis="primaryXAxis" :primaryYAxis="primaryYAxis" :wallColor='wallColor'
:enableRotation='enableRotation' :rotation='rotation' :tilt='tilt' :depth='depth'>
<e-chart3d-series-collection>
<e-chart3d-series :dataSource="seriesData" type="Column" xName="x" yName="y" columnSpacing=0.1></e-chart3d-series>
</e-chart3d-series-collection>
</ejs-chart3d>
</div>
</template>
<script setup>
import { provide } from "vue";
import { Chart3DComponent as EjsChart3d, Chart3DSeriesCollectionDirective as EChart3dSeriesCollection, Chart3DSeriesDirective as EChart3dSeries, ColumnSeries3D } from '@syncfusion/ej2-vue-charts';
const seriesData = [
{ x: 1, y: 7 }, { x: 2, y: 1 }, { x: 3, y: 1 }, { x: 4, y: 14 }, { x: 5, y: 1 }, { x: 6, y: 10 },
{ x: 7, y: 8 }, { x: 8, y: 6 }, { x: 9, y: 10 }, { x: 10, y: 10 }, { x: 11, y: 16 }, { x: 12, y: 6 },
{ x: 13, y: 14 }, { x: 14, y: 7 }, { x: 15, y: 5 }, { x: 16, y: 2 }, { x: 17, y: 14 }, { x: 18, y: 7 },
{ x: 19, y: 7 }, { x: 20, y: 10 }
];
const primaryXAxis = {
valueType: 'Double'
};
const primaryYAxis = {
labelFormat: 'c'
};
const wallColor = 'transparent';
const enableRotation = true;
const rotation = 7;
const tilt = 10;
const depth = 100;
provide('chart3d', [ColumnSeries3D]);
</script>
<style>
#container {
height: 350px;
}
</style><template>
<div id="app">
<ejs-chart3d id="container" :primaryXAxis="primaryXAxis" :primaryYAxis="primaryYAxis" :wallColor='wallColor'
:enableRotation='enableRotation' :rotation='rotation' :tilt='tilt' :depth='depth'>
<e-chart3d-series-collection>
<e-chart3d-series :dataSource="seriesData" type="Column" xName="x" yName="y" columnSpacing=0.1></e-chart3d-series>
</e-chart3d-series-collection>
</ejs-chart3d>
</div>
</template>
<script>
import { Chart3DComponent, Chart3DSeriesCollectionDirective, Chart3DSeriesDirective, ColumnSeries3D } from '@syncfusion/ej2-vue-charts';
export default {
name: "App",
components: {
'ejs-chart3d': Chart3DComponent,
'e-chart3d-series-collection': Chart3DSeriesCollectionDirective,
'e-chart3d-series': Chart3DSeriesDirective
},
data() {
return {
seriesData: [
{ x: 1, y: 7 }, { x: 2, y: 1 }, { x: 3, y: 1 }, { x: 4, y: 14 }, { x: 5, y: 1 }, { x: 6, y: 10 },
{ x: 7, y: 8 }, { x: 8, y: 6 }, { x: 9, y: 10 }, { x: 10, y: 10 }, { x: 11, y: 16 }, { x: 12, y: 6 },
{ x: 13, y: 14 }, { x: 14, y: 7 }, { x: 15, y: 5 }, { x: 16, y: 2 }, { x: 17, y: 14 }, { x: 18, y: 7 },
{ x: 19, y: 7 }, { x: 20, y: 10 }
],
primaryXAxis: {
valueType: 'Double'
},
primaryYAxis: {
labelFormat: 'c'
},
wallColor: 'transparent',
enableRotation: true,
rotation: 7,
tilt: 10,
depth: 100
};
},
provide: {
chart3d: [ColumnSeries3D]
}
};
</script>
<style>
#container {
height: 350px;
}
</style>The following table describes the result of applying some commonly used label formats on numeric values.
| Label Value | Label Format property value | Result | Description |
| 1000 | n1 | 1000.0 | The Number is rounded to 1 decimal place. |
| 1000 | n2 | 1000.00 | The Number is rounded to 2 decimal place. |
| 1000 | n3 | 1000.000 | The Number is rounded to 3 decimal place. |
| 0.01 | p1 | 1.0% | The Number is converted to percentage with 1 decimal place. |
| 0.01 | p2 | 1.00% | The Number is converted to percentage with 2 decimal place. |
| 0.01 | p3 | 1.000% | The Number is converted to percentage with 3 decimal place. |
| 1000 | c1 | $1000.0 | The Currency symbol is appended to number and number is rounded to 1 decimal place. |
| 1000 | c2 | $1000.00 | The Currency symbol is appended to number and number is rounded to 2 decimal place. |
Grouping separator
To separate the y-axis labels to groups of thousands, set the useGroupingSeparator property to true in the 3D chart.
<template>
<div id="app">
<ejs-chart3d id="container" :primaryXAxis="primaryXAxis" :wallColor='wallColor' :enableRotation='enableRotation'
:rotation='rotation' :tilt='tilt' :depth='depth' useGroupingSeparator='true'>
<e-chart3d-series-collection>
<e-chart3d-series :dataSource="seriesData" type="Column" xName="x" yName="y"></e-chart3d-series>
</e-chart3d-series-collection>
</ejs-chart3d>
</div>
</template>
<script setup>
import { provide } from "vue";
import { Chart3DComponent as EjsChart3d, Chart3DSeriesCollectionDirective as EChart3dSeriesCollection, Chart3DSeriesDirective as EChart3dSeries, ColumnSeries3D } from '@syncfusion/ej2-vue-charts';
const seriesData = [
{ x: 1, y: 7 }, { x: 2, y: 1 }, { x: 3, y: 1 }, { x: 4, y: 14 }, { x: 5, y: 1 }, { x: 6, y: 10 },
{ x: 7, y: 8 }, { x: 8, y: 6 }, { x: 9, y: 10 }, { x: 10, y: 10 }, { x: 11, y: 16 }, { x: 12, y: 6 },
{ x: 13, y: 14 }, { x: 14, y: 7 }, { x: 15, y: 5 }, { x: 16, y: 2 }, { x: 17, y: 14 }, { x: 18, y: 7 },
{ x: 19, y: 7 }, { x: 20, y: 10 }
];
const primaryXAxis = {
valueType: 'Double'
};
const wallColor = 'transparent';
const enableRotation = true;
const rotation = 7;
const tilt = 10;
const depth = 100;
provide('chart3d', [ColumnSeries3D]);
</script>
<style>
#container {
height: 350px;
}
</style><template>
<div id="app">
<ejs-chart3d id="container" :primaryXAxis="primaryXAxis" :wallColor='wallColor' :enableRotation='enableRotation'
:rotation='rotation' :tilt='tilt' :depth='depth' useGroupingSeparator='true'>
<e-chart3d-series-collection>
<e-chart3d-series :dataSource="seriesData" type="Column" xName="x" yName="y"></e-chart3d-series>
</e-chart3d-series-collection>
</ejs-chart3d>
</div>
</template>
<script>
import { Chart3DComponent, Chart3DSeriesCollectionDirective, Chart3DSeriesDirective, ColumnSeries3D } from '@syncfusion/ej2-vue-charts';
export default {
name: "App",
components: {
'ejs-chart3d': Chart3DComponent,
'e-chart3d-series-collection': Chart3DSeriesCollectionDirective,
'e-chart3d-series': Chart3DSeriesDirective
},
data() {
return {
seriesData: [
{ x: 1, y: 7 }, { x: 2, y: 1 }, { x: 3, y: 1 }, { x: 4, y: 14 }, { x: 5, y: 1 }, { x: 6, y: 10 },
{ x: 7, y: 8 }, { x: 8, y: 6 }, { x: 9, y: 10 }, { x: 10, y: 10 }, { x: 11, y: 16 }, { x: 12, y: 6 },
{ x: 13, y: 14 }, { x: 14, y: 7 }, { x: 15, y: 5 }, { x: 16, y: 2 }, { x: 17, y: 14 }, { x: 18, y: 7 },
{ x: 19, y: 7 }, { x: 20, y: 10 }
],
primaryXAxis: {
valueType: 'Double'
},
wallColor: 'transparent',
enableRotation: true,
rotation: 7,
tilt: 10,
depth: 100
};
},
provide: {
chart3d: [ColumnSeries3D]
}
};
</script>
<style>
#container {
height: 350px;
}
</style>Custom label format
The axis supports custom label format using placeholder like {value}°C, in which the value represent the axis label e.g 20°C.
<template>
<div id="app">
<ejs-chart3d id="container" :primaryYAxis="primaryYAxis" :wallColor='wallColor' :enableRotation='enableRotation'
:rotation='rotation' :tilt='tilt' :depth='depth'>
<e-chart3d-series-collection>
<e-chart3d-series :dataSource="seriesData" type="Column" xName="x" yName="y"></e-chart3d-series>
</e-chart3d-series-collection>
</ejs-chart3d>
</div>
</template>
<script setup>
import { provide } from "vue";
import { Chart3DComponent as EjsChart3d, Chart3DSeriesCollectionDirective as EChart3dSeriesCollection, Chart3DSeriesDirective as EChart3dSeries, ColumnSeries3D } from '@syncfusion/ej2-vue-charts';
const seriesData = [
{ x: 1, y: 7 }, { x: 2, y: 1 }, { x: 3, y: 1 }, { x: 4, y: 14 }, { x: 5, y: 1 }, { x: 6, y: 10 },
{ x: 7, y: 8 }, { x: 8, y: 6 }, { x: 9, y: 10 }, { x: 10, y: 10 }, { x: 11, y: 16 }, { x: 12, y: 6 },
{ x: 13, y: 14 }, { x: 14, y: 7 }, { x: 15, y: 5 }, { x: 16, y: 2 }, { x: 17, y: 14 }, { x: 18, y: 7 },
{ x: 19, y: 7 }, { x: 20, y: 10 }
];
const primaryYAxis = {
labelFormat: '${value}K'
};
const wallColor = 'transparent';
const enableRotation = true;
const rotation = 7;
const tilt = 10;
const depth = 100;
provide('chart3d', [ColumnSeries3D]);
</script>
<style>
#container {
height: 350px;
}
</style><template>
<div id="app">
<ejs-chart3d id="container" :primaryYAxis="primaryYAxis" :wallColor='wallColor' :enableRotation='enableRotation'
:rotation='rotation' :tilt='tilt' :depth='depth'>
<e-chart3d-series-collection>
<e-chart3d-series :dataSource="seriesData" type="Column" xName="x" yName="y"></e-chart3d-series>
</e-chart3d-series-collection>
</ejs-chart3d>
</div>
</template>
<script>
import { Chart3DComponent, Chart3DSeriesCollectionDirective, Chart3DSeriesDirective, ColumnSeries3D } from '@syncfusion/ej2-vue-charts';
export default {
name: "App",
components: {
'ejs-chart3d': Chart3DComponent,
'e-chart3d-series-collection': Chart3DSeriesCollectionDirective,
'e-chart3d-series': Chart3DSeriesDirective
},
data() {
return {
seriesData: [
{ x: 1, y: 7 }, { x: 2, y: 1 }, { x: 3, y: 1 }, { x: 4, y: 14 }, { x: 5, y: 1 }, { x: 6, y: 10 },
{ x: 7, y: 8 }, { x: 8, y: 6 }, { x: 9, y: 10 }, { x: 10, y: 10 }, { x: 11, y: 16 }, { x: 12, y: 6 },
{ x: 13, y: 14 }, { x: 14, y: 7 }, { x: 15, y: 5 }, { x: 16, y: 2 }, { x: 17, y: 14 }, { x: 18, y: 7 },
{ x: 19, y: 7 }, { x: 20, y: 10 }
],
primaryYAxis: {
labelFormat: '${value}K'
},
wallColor: 'transparent',
enableRotation: true,
rotation: 7,
tilt: 10,
depth: 100
};
},
provide: {
chart3d: [ColumnSeries3D]
}
};
</script>
<style>
#container {
height: 350px;
}
</style>