Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * @license
- * Copyright (c) 2014, 2019, Oracle and/or its affiliates.
- * The Universal Permissive License (UPL), Version 1.0
- * @ignore
- */
- define(['knockout',
- 'ojs/ojbootstrap', 'ojs/ojresponsiveutils',
- 'ojs/ojresponsiveknockoututils', 'ojs/ojknockout',
- 'ojs/ojnavigationlist', 'ojs/ojlabel',
- 'ojs/ojselectcombobox', 'ojs/ojchart'],
- function (ko, Bootstrap, ResponsiveUtils, ResponsiveKnockoutUtils) {
- function StatsViewModel() {
- var self = this;
- self.checkValue = ko.observableArray();
- self.dircolumn = ko.pureComputed(function () {
- return (typeof self.checkValue()[0] !== 'undefined' && self.checkValue()[0] != null && self.checkValue()[0] === "dirColumn") ? true : false;
- }.bind(self));
- var mdQuery = ResponsiveUtils.getFrameworkQuery(ResponsiveUtils.FRAMEWORK_QUERY_KEY.MD_UP);
- self.medium = ResponsiveKnockoutUtils.createMediaQueryObservable(mdQuery);
- self.selectedItem = ko.observable("bar");
- self.val = ko.observable("bar");
- /* toggle button variables */
- self.stackValue = ko.observable('off');
- self.orientationValue = ko.observable('vertical');
- /* chart data */
- var barSeries = [{ name: "Schimb ulei si filtre", items: [Math.floor(Math.random() * 55) + 1, Math.floor(Math.random() * 55) + 1] },
- { name: "Schimb distributie", items: [Math.floor(Math.random() * 55) + 1, Math.floor(Math.random() * 55) + 1] },
- { name: "Diagnoza ODB", items: [Math.floor(Math.random() * 55) + 1, Math.floor(Math.random() * 55) + 1] },
- { name: "Pachet revizie", items: [Math.floor(Math.random() * 55) + 1, Math.floor(Math.random() * 55) + 1] },
- { name: "Inspectie Electrica", items: [Math.floor(Math.random() * 55) + 1, Math.floor(Math.random() * 55) + 1] },
- { name: "Geometrie roti", items: [Math.floor(Math.random() * 55) + 1, Math.floor(Math.random() * 55) + 1] },
- { name: "Inspectie pt ITP", items: [Math.floor(Math.random() * 55) + 1, Math.floor(Math.random() * 55) + 1] }];
- var barGroups = ["Group A", "Group B"];
- self.barSeriesValue = ko.observableArray(barSeries);
- self.barGroupsValue = ko.observableArray(barGroups);
- self.selectedItem = self.val;
- }
- return StatsViewModel;
- Bootstrap.whenDocumentReady().then(function () {
- ko.applyBindings(new StatsViewModel(), document.getElementById('tabbardemo'));
- });
- }
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement