Flexmonster Software License Agreement (“Agreement”) has been revised and is effective as of February 18, 2025.
The following modifications were made:
Downloading, installing, and/or continuing to use Flexmonster Software after February 18, 2026, constitutes Licensee’s acceptance of the terms and conditions of the modified version of Agreement. If Licensee does not agree to any of these terms and conditions, they must cease using Flexmonster Software and must not download, install, use, access, or continue to access Flexmonster Software. By continuing to use Flexmonster Software or renewing the license or maintenance after the effective date of these modifications to Agreement, Licensee accepts and agrees to be bound by the terms and conditions of the modified Agreement.
Integrate the Flexmonster pivot table with the Highcharts library in the Vue.js framework.
Play with the demo on a larger screen: save this link for later or watch the video review now.
Use the multi-platform charting library together with pivot functionality for insightful business reports. Create a ready-to-use dashboard for your Vue project following an intelligible Integration with Highcharts guide.
The dashboard shows all core metrics that help you discover new insights. Link up the pivot grid with charts, slice and dice the data any way you want, and immediately see the updated result on the charts.
<template>
<Pivot
ref="pivot"
componentFolder="https://cdn.flexmonster.com/"
height="300"
licenseFilePath="https://cdn.flexmonster.com/jsfiddle.charts.key"
v-bind:report="report"
v-bind:reportcomplete="reportcomplete"
/>
<div class="demo-box">
<div class="demo-title">Requests vs Answered Calls</div>
<div id="highcharts-container"></div>
</div>
<div class="demo-box">
<div class="demo-title">Revenue vs Support Cost</div>
<div id="highcharts-column-container"></div>
</div>
<div class="demo-box">
<div class="demo-title">Customer Satisfaction</div>
<div id="highcharts-pie-container"></div>
</div>
</template>
<script>
import Pivot from "vue-flexmonster/vue3";
import "flexmonster/flexmonster.css";
import "flexmonster/lib/flexmonster.highcharts";
import Highcharts from "highcharts";
export default {
name: "PivotComponent",
components: {
Pivot,
},
data() {
return {
report: {
dataSource: {
type: "json",
filename: "https://cdn.flexmonster.com/data/demos/highcharts-demo-data.json",
},
slice: {
rows: [
{
uniqueName: "Date.Month",
},
],
columns: [
{
uniqueName: "[Measures]",
},
],
measures: [
{
uniqueName: "Requests",
aggregation: "sum",
},
{
uniqueName: "Answered Calls",
aggregation: "sum",
},
{
uniqueName: "Revenue",
aggregation: "sum",
format: "currency",
active: false,
},
],
sorting: {
column: {
type: "desc",
tuple: [],
measure: {
uniqueName: "Answered Calls",
aggregation: "sum",
},
},
},
},
formats: [
{
name: "",
thousandsSeparator: ",",
},
{
name: "currency",
decimalSeparator: ".",
decimalPlaces: 2,
currencySymbol: "$",
},
],
options: {
showHeaders: false,
},
},
};
},
methods: {
reportcomplete() {
this.$refs.pivot.flexmonster.off("reportcomplete");
this.setGlobalChartsOptions();
this.createLineChart();
this.createColumnChart();
this.createPieChart();
},
setGlobalChartsOptions() {
Highcharts.setOptions({
colors: [
"#4cbf8b",
"#e8734c",
"#ffcd4c",
"#9875e3",
"#4c9eff",
"#8acfc3",
"#cd97e6",
"#f1d34c",
"#65d2e7",
],
lang: {
thousandsSep: ",",
},
chart: {
plotBackgroundColor: "#fafafa",
backgroundColor: "#fafafa",
style: {
fontFamily: "Serif Typeface",
},
},
});
},
createLineChart() {
this.$refs.pivot.flexmonster.highcharts.getData(
{
type: "line",
},
this.drawLineChart,
this.updateLineChart,
);
},
drawLineChart(chartData) {
chartData.xAxis.title.enabled = false;
chartData.xAxis.type = "datetime";
Highcharts.chart("highcharts-container", chartData);
},
updateLineChart(chartData) {
this.drawLineChart(chartData);
},
createColumnChart() {
this.$refs.pivot.flexmonster.highcharts.getData(
{
type: "column",
slice: {
rows: [
{
uniqueName: "Date.Month",
},
],
columns: [
{
uniqueName: "[Measures]",
},
],
measures: [
{
uniqueName: "Revenue",
aggregation: "sum",
},
{
uniqueName: "Support Cost",
aggregation: "sum",
},
],
},
},
this.drawColumnChart,
this.updateColumnChart,
);
},
drawColumnChart(chartData, rawData) {
let currencyFormat = rawData.meta.formats.find(
(format) => format.name == "currency",
);
chartData.xAxis.title.enabled = false;
chartData.legend = {
enabled: false,
};
if (chartData.yAxis == undefined) chartData.yAxis = {};
for (let i = 0; i < chartData.yAxis.length; i++) {
chartData.yAxis[i].labels = {
format: pivot.highcharts.getAxisFormat(currencyFormat),
};
}
for (let i = 0; i < chartData.series.length; i++) {
chartData.series[i].tooltip = {
pointFormat:
"{series.name}: <b>" +
pivot.highcharts.getPointYFormat(currencyFormat) +
"</b><br/>",
};
}
chartData.xAxis.type = "datetime";
Highcharts.chart("highcharts-column-container", chartData);
},
updateColumnChart(chartData) {
// Here you can add your own logic for updating the chart
},
createPieChart() {
this.$refs.pivot.flexmonster.highcharts.getData(
{
type: "pie",
slice: {
rows: [
{
uniqueName: "Customer Satisfaction",
},
],
columns: [
{
uniqueName: "[Measures]",
},
],
measures: [
{
uniqueName: "Answered Calls",
aggregation: "sum",
},
],
},
},
this.drawPieChart,
this.updatePieChart,
);
},
drawPieChart(chartData) {
Highcharts.chart("highcharts-pie-container", chartData);
},
updatePieChart(chartData) {
// Here you can add your own logic for updating the chart
},
},
};
</script>
.demo-box {
background-color: #fafafa;
position: relative;
padding: 40px 30px 30px 30px;
border: 1px solid #e9e9e9;
margin-bottom: 20px;
margin-top: 40px;
}
.demo-title {
font-size: 18px;
font-weight: 600;
margin-bottom: 30px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
color: #555;
}
Empower your Vue.js application with interactive features of the pivot table and different chart types.
Can't find your answer here?
Visit the FAQ page
Flexmonster Pivot Table & Charts is a JavaScript pivot table component for adding interactive reporting and data analysis to web applications. Users can summarize, filter, sort, and explore data in pivot tables and charts, drill into results, and export reports.
Flexmonster works in plain JavaScript and TypeScript projects. It also integrates with React, Next.js, Angular, Vue, Blazor, and other technologies. See all integration options.
Flexmonster supports JSON and CSV files, SQL databases, MongoDB, Elasticsearch, and Microsoft Analysis Services (SSAS). You can also connect other data sources through your own backend. See supported data sources.
Flexmonster offers licenses for internal corporate use, SaaS products, and OEM distribution. Pricing varies by license and plan. SaaS projects can also use the free SaaS Entry license during development. Learn more on the pricing page.
Yes. Flexmonster offers a 30-day free trial that lets you evaluate all its features. No credit card is required. The trial version has a watermark.
To get started with Flexmonster, follow our integration guide.