|
@@ -1,63 +0,0 @@
|
|
|
-function sales_in_warehouse_by_brand (widget) {
|
|
|
- "use strict";
|
|
|
-
|
|
|
- widget.SalesInWarehouseByBrandWidget = widget.Base.extend({
|
|
|
- template: 'SalesInWarehouseByBrandTmpl',
|
|
|
- data: [],
|
|
|
- init: function (parent) {
|
|
|
- this._super(parent, {
|
|
|
- width: 6,
|
|
|
- height: 6
|
|
|
- });
|
|
|
- },
|
|
|
- start: function () {
|
|
|
- var chart = new Chart(this.$el.find('#sales-in-warehouse-by-brand'), {
|
|
|
- type: 'radar',
|
|
|
- data: {
|
|
|
- labels: ["Marca 1", "Marca 2", "Marca 3", "Marca 4", "Marca 5", "Marca 6", "Marca 7"],
|
|
|
- datasets: [
|
|
|
- {
|
|
|
- label: "Almacén 1",
|
|
|
- backgroundColor: "rgba(179,181,198,0.2)",
|
|
|
- borderColor: "rgba(179,181,198,1)",
|
|
|
- pointBackgroundColor: "rgba(179,181,198,1)",
|
|
|
- pointBorderColor: "#fff",
|
|
|
- pointHoverBackgroundColor: "#fff",
|
|
|
- pointHoverBorderColor: "rgba(179,181,198,1)",
|
|
|
- data: [65, 59, 90, 81, 56, 55, 40]
|
|
|
- },
|
|
|
- {
|
|
|
- label: "Almacén 2",
|
|
|
- backgroundColor: "rgba(255,99,132,0.2)",
|
|
|
- borderColor: "rgba(255,99,132,1)",
|
|
|
- pointBackgroundColor: "rgba(255,99,132,1)",
|
|
|
- pointBorderColor: "#fff",
|
|
|
- pointHoverBackgroundColor: "#fff",
|
|
|
- pointHoverBorderColor: "rgba(255,99,132,1)",
|
|
|
- data: [28, 48, 40, 19, 96, 27, 100]
|
|
|
- },
|
|
|
- {
|
|
|
- label: "Almacén 3",
|
|
|
- backgroundColor: "rgba(120,99,132,0.2)",
|
|
|
- borderColor: "rgba(120,99,132,1)",
|
|
|
- pointBackgroundColor: "rgba(120,99,132,1)",
|
|
|
- pointBorderColor: "#fff",
|
|
|
- pointHoverBackgroundColor: "#fff",
|
|
|
- pointHoverBorderColor: "rgba(120,99,132,1)",
|
|
|
- data: [30, 22, 85, 36, 44, 5, 63]
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- options: {
|
|
|
- maintainAspectRatio: false,
|
|
|
- layout: {
|
|
|
- padding: 20
|
|
|
- },
|
|
|
- legend: {
|
|
|
- display: true
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
-}
|