Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-chartjs

Package Overview
Dependencies
Maintainers
1
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-chartjs - npm Package Compare versions

Comparing version 4.1.0 to 4.1.1

42

dist/index.js

@@ -6,6 +6,6 @@ import { Chart, BarController, DoughnutController, LineController, PieController, PolarAreaController, RadarController, BubbleController, ScatterController } from 'chart.js';

(function(ChartEmits) {
ChartEmits["ChartRendered"] = 'chart:rendered';
ChartEmits["ChartUpdated"] = 'chart:updated';
ChartEmits["ChartDestroyed"] = 'chart:destroyed';
ChartEmits["LabelsUpdated"] = 'labels:updated';
ChartEmits["ChartRendered"] = "chart:rendered";
ChartEmits["ChartUpdated"] = "chart:updated";
ChartEmits["ChartDestroyed"] = "chart:destroyed";
ChartEmits["LabelsUpdated"] = "labels:updated";
})(ChartEmits || (ChartEmits = {}));

@@ -32,3 +32,3 @@ function chartCreate(createChartFunction, chartData, chartOptions, context) {

const nextData = {
labels: typeof data.labels === 'undefined' ? [] : [
labels: typeof data.labels === "undefined" ? [] : [
...data.labels

@@ -83,4 +83,4 @@ ],

}
const templateError = 'Please remove the <template></template> tags from your chart component. See https://vue-chartjs.org/guide/#vue-single-file-components';
const chartUpdateError = 'Update ERROR: chart instance not found';
const templateError = "Please remove the <template></template> tags from your chart component. See https://vue-chartjs.org/guide/#vue-single-file-components";
const chartUpdateError = "Update ERROR: chart instance not found";

@@ -100,3 +100,3 @@ const generateChart = (chartId, chartType, chartController)=>{

type: String,
default: 'label'
default: "label"
},

@@ -117,3 +117,3 @@ chartId: {

type: String,
default: ''
default: ""
},

@@ -141,3 +141,3 @@ styles: {

const chartData = getChartData(data, props.datasetIdKey);
const canvasEl2DContext = canvasEl.value.getContext('2d');
const canvasEl2DContext = canvasEl.value.getContext("2d");
if (canvasEl2DContext !== null) {

@@ -210,3 +210,3 @@ _chart.value = new Chart(canvasEl2DContext, {

onMounted(()=>{
if ('datasets' in props.chartData && props.chartData.datasets.length > 0) {
if ("datasets" in props.chartData && props.chartData.datasets.length > 0) {
chartCreate(renderChart, props.chartData, props.chartOptions, context);

@@ -224,7 +224,7 @@ }

});
return ()=>h('div', {
return ()=>h("div", {
style: props.styles,
class: props.cssClasses
}, [
h('canvas', {
h("canvas", {
id: props.chartId,

@@ -240,12 +240,12 @@ width: props.width,

};
const Bar = /* #__PURE__ */ generateChart('bar-chart', 'bar', BarController);
const Doughnut = /* #__PURE__ */ generateChart('doughnut-chart', 'doughnut', DoughnutController);
const Line = /* #__PURE__ */ generateChart('line-chart', 'line', LineController);
const Pie = /* #__PURE__ */ generateChart('pie-chart', 'pie', PieController);
const PolarArea = /* #__PURE__ */ generateChart('polar-chart', 'polarArea', PolarAreaController);
const Radar = /* #__PURE__ */ generateChart('radar-chart', 'radar', RadarController);
const Bubble = /* #__PURE__ */ generateChart('bubble-chart', 'bubble', BubbleController);
const Scatter = /* #__PURE__ */ generateChart('scatter-chart', 'scatter', ScatterController);
const Bar = /* #__PURE__ */ generateChart("bar-chart", "bar", BarController);
const Doughnut = /* #__PURE__ */ generateChart("doughnut-chart", "doughnut", DoughnutController);
const Line = /* #__PURE__ */ generateChart("line-chart", "line", LineController);
const Pie = /* #__PURE__ */ generateChart("pie-chart", "pie", PieController);
const PolarArea = /* #__PURE__ */ generateChart("polar-chart", "polarArea", PolarAreaController);
const Radar = /* #__PURE__ */ generateChart("radar-chart", "radar", RadarController);
const Bubble = /* #__PURE__ */ generateChart("bubble-chart", "bubble", BubbleController);
const Scatter = /* #__PURE__ */ generateChart("scatter-chart", "scatter", ScatterController);
export { Bar, Bubble, Doughnut, Line, Pie, PolarArea, Radar, Scatter, generateChart };
//# sourceMappingURL=index.js.map

@@ -1,108 +0,9 @@

export namespace Bar {
namespace props {
namespace chartData {
const type: ObjectConstructor;
const required: boolean;
}
namespace chartOptions {
const type_1: ObjectConstructor;
export { type_1 as type };
function _default(): void;
export { _default as default };
}
namespace datasetIdKey {
const type_2: StringConstructor;
export { type_2 as type };
const _default_1: string;
export { _default_1 as default };
}
namespace chartId {
const type_3: StringConstructor;
export { type_3 as type };
export { chartId as default };
}
namespace width {
const type_4: NumberConstructor;
export { type_4 as type };
const _default_2: number;
export { _default_2 as default };
}
namespace height {
const type_5: NumberConstructor;
export { type_5 as type };
const _default_3: number;
export { _default_3 as default };
}
namespace cssClasses {
const type_6: StringConstructor;
export { type_6 as type };
const _default_4: string;
export { _default_4 as default };
}
namespace styles {
const type_7: ObjectConstructor;
export { type_7 as type };
function _default_5(): void;
export { _default_5 as default };
}
namespace plugins {
const type_8: ArrayConstructor;
export { type_8 as type };
function _default_6(): any[];
export { _default_6 as default };
}
}
function data(): {
_chart: any;
};
function data(): {
_chart: any;
};
namespace computed {
function hasAnnotationPlugin(): boolean;
function hasAnnotationPlugin(): boolean;
}
function created(): void;
function created(): void;
function mounted(): void;
function mounted(): void;
namespace watch {
export namespace chartData_1 {
function handler(newValue: any, oldValue: any): void;
const deep: boolean;
}
export { chartData_1 as chartData };
export namespace chartOptions_1 {
export function handler_1(newValue: any): void;
export { handler_1 as handler };
const deep_1: boolean;
export { deep_1 as deep };
}
export { chartOptions_1 as chartOptions };
}
namespace methods {
function renderChart(data: any, options: any): void;
function renderChart(data: any, options: any): void;
function chartDataHandler(newValue: any, oldValue: any): void;
function chartDataHandler(newValue: any, oldValue: any): void;
function chartOptionsHandler(options: any): void;
function chartOptionsHandler(options: any): void;
function updateChart(): void;
function updateChart(): void;
function getCurrentChart(): any;
function getCurrentChart(): any;
function setCurrentChart(chart: any): void;
function setCurrentChart(chart: any): void;
}
function beforeDestroy(): void;
function beforeDestroy(): void;
function render(createElement: any): any;
}
export namespace Bubble { }
export namespace Doughnut { }
export namespace Line { }
export namespace Pie { }
export namespace PolarArea { }
export namespace Radar { }
export namespace Scatter { }
/** @type Object */ export const Bar: any;
/** @type Object */ export const Bubble: any;
/** @type Object */ export const Doughnut: any;
/** @type Object */ export const Line: any;
/** @type Object */ export const Pie: any;
/** @type Object */ export const PolarArea: any;
/** @type Object */ export const Radar: any;
/** @type Object */ export const Scatter: any;
export function generateChart(chartId: any, chartType: any, chartController: any): {

@@ -109,0 +10,0 @@ props: {

@@ -5,6 +5,6 @@ import { Chart, BarController, DoughnutController, LineController, PieController, PolarAreaController, RadarController, BubbleController, ScatterController } from 'chart.js';

(function(ChartEmits) {
ChartEmits["ChartRendered"] = 'chart:rendered';
ChartEmits["ChartUpdated"] = 'chart:updated';
ChartEmits["ChartDestroyed"] = 'chart:destroyed';
ChartEmits["LabelsUpdated"] = 'labels:updated';
ChartEmits["ChartRendered"] = "chart:rendered";
ChartEmits["ChartUpdated"] = "chart:updated";
ChartEmits["ChartDestroyed"] = "chart:destroyed";
ChartEmits["LabelsUpdated"] = "labels:updated";
})(ChartEmits || (ChartEmits = {}));

@@ -31,3 +31,3 @@ function chartCreate(createChartFunction, chartData, chartOptions, context) {

const nextData = {
labels: typeof data.labels === 'undefined' ? [] : [
labels: typeof data.labels === "undefined" ? [] : [
...data.labels

@@ -82,5 +82,5 @@ ],

}
const templateError = 'Please remove the <template></template> tags from your chart component. See https://vue-chartjs.org/guide/#vue-single-file-components';
const templateError = "Please remove the <template></template> tags from your chart component. See https://vue-chartjs.org/guide/#vue-single-file-components";
const ANNOTATION_PLUGIN_KEY = 'annotation';
const ANNOTATION_PLUGIN_KEY = "annotation";
function generateChart(chartId, chartType, chartController) {

@@ -100,3 +100,3 @@ let _chartRef = null;

type: String,
default: 'label'
default: "label"
},

@@ -117,3 +117,3 @@ chartId: {

type: String,
default: ''
default: ""
},

@@ -138,3 +138,3 @@ styles: {

const pluginSettings = (ref = this.chartOptions) === null || ref === void 0 ? void 0 : (ref1 = ref.plugins) === null || ref1 === void 0 ? void 0 : ref1[ANNOTATION_PLUGIN_KEY];
return typeof pluginSettings !== 'undefined';
return typeof pluginSettings !== "undefined";
}

@@ -149,3 +149,3 @@ },

};
if ('datasets' in this.chartData && this.chartData.datasets.length > 0) {
if ("datasets" in this.chartData && this.chartData.datasets.length > 0) {
chartCreate(this.renderChart, this.chartData, this.chartOptions);

@@ -180,3 +180,3 @@ this.$emit(ChartEmits.ChartRendered);

const chartData = getChartData(data, this.datasetIdKey);
const canvasEl2DContext = this.$refs.canvas.getContext('2d');
const canvasEl2DContext = this.$refs.canvas.getContext("2d");
if (canvasEl2DContext !== null) {

@@ -255,7 +255,7 @@ this.setCurrentChart(new Chart(canvasEl2DContext, {

render: function(createElement) {
return createElement('div', {
return createElement("div", {
style: this.styles,
class: this.cssClasses
}, [
createElement('canvas', {
createElement("canvas", {
attrs: {

@@ -266,3 +266,3 @@ id: this.chartId,

},
ref: 'canvas'
ref: "canvas"
})

@@ -273,12 +273,12 @@ ]);

}
const Bar = /* #__PURE__ */ generateChart('bar-chart', 'bar', BarController);
const Doughnut = /* #__PURE__ */ generateChart('doughnut-chart', 'doughnut', DoughnutController);
const Line = /* #__PURE__ */ generateChart('line-chart', 'line', LineController);
const Pie = /* #__PURE__ */ generateChart('pie-chart', 'pie', PieController);
const PolarArea = /* #__PURE__ */ generateChart('polar-chart', 'polarArea', PolarAreaController);
const Radar = /* #__PURE__ */ generateChart('radar-chart', 'radar', RadarController);
const Bubble = /* #__PURE__ */ generateChart('bubble-chart', 'bubble', BubbleController);
const Scatter = /* #__PURE__ */ generateChart('scatter-chart', 'scatter', ScatterController);
/** @type Object */ const Bar = /* #__PURE__ */ generateChart("bar-chart", "bar", BarController);
/** @type Object */ const Doughnut = /* #__PURE__ */ generateChart("doughnut-chart", "doughnut", DoughnutController);
/** @type Object */ const Line = /* #__PURE__ */ generateChart("line-chart", "line", LineController);
/** @type Object */ const Pie = /* #__PURE__ */ generateChart("pie-chart", "pie", PieController);
/** @type Object */ const PolarArea = /* #__PURE__ */ generateChart("polar-chart", "polarArea", PolarAreaController);
/** @type Object */ const Radar = /* #__PURE__ */ generateChart("radar-chart", "radar", RadarController);
/** @type Object */ const Bubble = /* #__PURE__ */ generateChart("bubble-chart", "bubble", BubbleController);
/** @type Object */ const Scatter = /* #__PURE__ */ generateChart("scatter-chart", "scatter", ScatterController);
export { Bar, Bubble, Doughnut, Line, Pie, PolarArea, Radar, Scatter, generateChart };
//# sourceMappingURL=index.js.map
{
"name": "vue-chartjs",
"version": "4.1.0",
"packageManager": "pnpm@6.32.12",
"version": "4.1.1",
"packageManager": "pnpm@6.32.17",
"description": "Vue.js wrapper for chart.js for creating beautiful charts.",

@@ -6,0 +6,0 @@ "author": "Jakub Juszczak <jakub@posteo.de>",

@@ -227,3 +227,4 @@ # vue-chartjs

- [Access to Chart instance](https://vue-chartjs.org/guide/#access-to-chart-instance)
- [Migration to v4](https://vue-chartjs.org/migration-to-v4/)
- [Migration from v3 to v4](https://vue-chartjs.org/migration-guides/#migration-from-v3-to-v4/)
- [Migration from vue-chart-3](https://vue-chartjs.org/migration-guides/#migration-from-vue-chart-3/)
- [API](https://vue-chartjs.org/api/)

@@ -230,0 +231,0 @@ - [Examples](https://vue-chartjs.org/examples/)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc