├── quantum
├── lib
│ ├── metrics-graphics
│ │ ├── src
│ │ │ ├── scss
│ │ │ │ └── .gitignore
│ │ │ └── js
│ │ │ │ ├── MG.js
│ │ │ │ ├── common
│ │ │ │ ├── register.js
│ │ │ │ ├── hooks.js
│ │ │ │ ├── chart_title.js
│ │ │ │ └── window_listeners.js
│ │ │ │ └── misc
│ │ │ │ ├── error.js
│ │ │ │ └── transitions.js
│ │ ├── tests
│ │ │ ├── misc
│ │ │ │ ├── .gitkeep
│ │ │ │ ├── process_test.js
│ │ │ │ └── utility_test.js
│ │ │ ├── common
│ │ │ │ ├── .gitkeep
│ │ │ │ ├── resize_test.js
│ │ │ │ ├── data_graphic_test.js
│ │ │ │ └── chart_title_test.js
│ │ │ ├── helpers.js
│ │ │ └── charts
│ │ │ │ ├── histogram_test.js
│ │ │ │ ├── bar_test.js
│ │ │ │ └── missing_test.js
│ │ ├── gulpfile.js
│ │ ├── index.js
│ │ ├── .jshintignore
│ │ ├── examples
│ │ │ ├── images
│ │ │ │ ├── divider.png
│ │ │ │ └── og-logo.png
│ │ │ ├── css
│ │ │ │ ├── metricsgraphics-demo-accessible.css
│ │ │ │ ├── addons
│ │ │ │ │ └── mg_line_brushing.css
│ │ │ │ └── highlightjs-default.css
│ │ │ ├── data
│ │ │ │ ├── neg2.json
│ │ │ │ ├── small-range.json
│ │ │ │ ├── xnotdate.json
│ │ │ │ ├── missing-y.json
│ │ │ │ ├── missing-is-hidden.json
│ │ │ │ ├── missing-is-hidden-accessor.json
│ │ │ │ ├── make_fake_data.py
│ │ │ │ └── firefox_releases.json
│ │ │ └── charts
│ │ │ │ ├── other.htm
│ │ │ │ └── addons.htm
│ │ ├── .gitignore
│ │ ├── .jshintrc
│ │ ├── .travis.yml
│ │ ├── .editorconfig
│ │ ├── bower.json
│ │ ├── contribute.json
│ │ ├── testem.json
│ │ ├── HOOKS.md
│ │ └── package.json
│ ├── jstree
│ │ └── themes
│ │ │ ├── apple
│ │ │ ├── bg.jpg
│ │ │ ├── d.png
│ │ │ ├── throbber.gif
│ │ │ └── dot_for_ie.gif
│ │ │ ├── classic
│ │ │ ├── d.gif
│ │ │ ├── d.png
│ │ │ ├── throbber.gif
│ │ │ └── dot_for_ie.gif
│ │ │ ├── default
│ │ │ ├── d.gif
│ │ │ ├── d.png
│ │ │ └── throbber.gif
│ │ │ └── default-rtl
│ │ │ ├── d.gif
│ │ │ ├── d.png
│ │ │ ├── dots.gif
│ │ │ └── throbber.gif
│ ├── ccc
│ │ ├── pvc
│ │ │ ├── _namespace.pvc.js
│ │ │ ├── pvcBarPanel.js
│ │ │ ├── pvcNormalizedBarPanel.js
│ │ │ ├── pvcCategoricalAbstractPanel.js
│ │ │ ├── visual
│ │ │ │ ├── plot
│ │ │ │ │ ├── BarPlot.js
│ │ │ │ │ ├── BulletPlot.js
│ │ │ │ │ ├── NormalizedBarPlot.js
│ │ │ │ │ ├── MetricXYPlot.js
│ │ │ │ │ ├── CategoricalPlot.js
│ │ │ │ │ ├── PointPlot.js
│ │ │ │ │ ├── MetricPointPlot.js
│ │ │ │ │ ├── WaterfallPlot.js
│ │ │ │ │ ├── HeatGridPlot.js
│ │ │ │ │ ├── BoxPlot.js
│ │ │ │ │ └── BarPlotAbstract.js
│ │ │ │ ├── CartesianAxisRootScene.js
│ │ │ │ ├── sign
│ │ │ │ │ ├── Label.js
│ │ │ │ │ ├── Panel.js
│ │ │ │ │ ├── Rule.js
│ │ │ │ │ ├── Area.js
│ │ │ │ │ ├── Bar.js
│ │ │ │ │ └── Line.js
│ │ │ │ ├── CartesianAxisTickScene.js
│ │ │ │ ├── legend
│ │ │ │ │ ├── BulletItemRenderer.js
│ │ │ │ │ ├── BulletItemSceneVisibility.js
│ │ │ │ │ ├── BulletItemSceneSelection.js
│ │ │ │ │ ├── WaterfallBulletGroupScene.js
│ │ │ │ │ └── BulletGroupScene.js
│ │ │ │ └── SizeAxis.js
│ │ │ ├── pvcTitlePanel.js
│ │ │ ├── pvcPlotBgPanel.js
│ │ │ ├── pvcAxisTitlePanel.js
│ │ │ ├── data
│ │ │ │ ├── DataOper.js
│ │ │ │ ├── ComplexView.js
│ │ │ │ ├── translation
│ │ │ │ │ ├── BoxplotChartTranslationOper.js
│ │ │ │ │ └── MetricPointChartTranslationOper.js
│ │ │ │ ├── _data.js
│ │ │ │ └── Atom.js
│ │ │ ├── pvcPlotPanel.js
│ │ │ ├── pvcAbstract.js
│ │ │ ├── pvcNormalizedBarChart.js
│ │ │ ├── pvcBarAbstract.js
│ │ │ ├── pvcPieChart.js
│ │ │ ├── pvcBaseChart.plots.js
│ │ │ └── pvcBarChart.js
│ │ ├── data
│ │ │ ├── bp.js
│ │ │ └── dt.js
│ │ └── lib
│ │ │ └── tipsy.css
│ ├── jquery-ui
│ │ └── css
│ │ │ └── start
│ │ │ └── images
│ │ │ ├── animated-overlay.gif
│ │ │ ├── ui-icons_0078ae_256x240.png
│ │ │ ├── ui-icons_056b93_256x240.png
│ │ │ ├── ui-icons_d8e7f3_256x240.png
│ │ │ ├── ui-icons_e0fdff_256x240.png
│ │ │ ├── ui-icons_f5e175_256x240.png
│ │ │ ├── ui-icons_f7a50d_256x240.png
│ │ │ ├── ui-icons_fcd113_256x240.png
│ │ │ ├── ui-bg_flat_55_999999_40x100.png
│ │ │ ├── ui-bg_flat_75_aaaaaa_40x100.png
│ │ │ ├── ui-bg_glass_45_0078ae_1x400.png
│ │ │ ├── ui-bg_glass_55_f8da4e_1x400.png
│ │ │ ├── ui-bg_glass_75_79c9ec_1x400.png
│ │ │ ├── ui-bg_inset-hard_100_fcfdfd_1x100.png
│ │ │ ├── ui-bg_gloss-wave_45_e14f1c_500x100.png
│ │ │ ├── ui-bg_gloss-wave_50_6eac2c_500x100.png
│ │ │ └── ui-bg_gloss-wave_75_2191c0_500x100.png
│ ├── jquery-linedtextarea
│ │ ├── jquery-linedtextarea-license.txt
│ │ ├── jquery-linedtextarea.html
│ │ └── jquery-linedtextarea.css
│ ├── d3
│ │ ├── LICENSE
│ │ └── README.md
│ └── jsonlint
│ │ └── jsl.format.js
├── blockers.html
├── images
│ ├── Add.png
│ ├── Minus.png
│ ├── New.gif
│ ├── Plus.png
│ ├── fxos.ico
│ ├── grain.png
│ ├── tab.png
│ ├── Remove.png
│ ├── bg-sand.png
│ ├── spinner.gif
│ ├── Spreadsheet.png
│ └── bg-gradient-sand.png
├── modevlib
│ ├── threads
│ │ └── README.md
│ ├── gui
│ │ ├── Progress.js
│ │ ├── README.md
│ │ ├── RadioFilter.js
│ │ └── accordion.js
│ ├── util
│ │ ├── aTest.js
│ │ ├── aHTML.js
│ │ ├── aParse.js
│ │ ├── aTimer.js
│ │ └── State.js
│ ├── main.js
│ ├── aLibrary.js
│ ├── .editorconfig
│ ├── aFormat.js
│ ├── charts
│ │ └── README.md
│ ├── QuantumFlowBugs.js
│ ├── Dimension-Jobs.js
│ ├── ESQueryRunner.js
│ ├── Dimension-Performance.js
│ ├── collections
│ │ ├── aSet.js
│ │ └── aRelation.js
│ ├── graph
│ │ └── topologicalSort.js
│ ├── ScrumBugs.js
│ ├── qb
│ │ ├── ActiveDataQuery.js
│ │ └── aCompiler.js
│ ├── Bugzilla.js
│ ├── Dimension-Partners.js
│ └── Settings.js
├── css
│ ├── OpenSans-Bold-webfont.eot
│ ├── OpenSans-Bold-webfont.ttf
│ ├── OpenSans-Bold-webfont.woff
│ ├── OpenSans-Light-webfont.eot
│ ├── OpenSans-Light-webfont.ttf
│ └── OpenSans-Light-webfont.woff
├── js
│ ├── chart_lib.js
│ ├── main_lib.js
│ ├── burndown.js
│ ├── hierarchy.js
│ └── regressionCharts.js
└── .editorconfig
├── .gitignore
└── README.md
/quantum/lib/metrics-graphics/src/scss/.gitignore:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/quantum/lib/metrics-graphics/tests/misc/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/quantum/lib/metrics-graphics/tests/common/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/quantum/blockers.html:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/quantum/lib/metrics-graphics/src/js/MG.js:
--------------------------------------------------------------------------------
1 | window.MG = {version: '2.10.1'};
2 |
--------------------------------------------------------------------------------
/quantum/lib/metrics-graphics/gulpfile.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | require('./gulp');
4 |
--------------------------------------------------------------------------------
/quantum/lib/metrics-graphics/index.js:
--------------------------------------------------------------------------------
1 | module.exports = require('./dist/metricsgraphics')
2 |
--------------------------------------------------------------------------------
/quantum/images/Add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/images/Add.png
--------------------------------------------------------------------------------
/quantum/images/Minus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/images/Minus.png
--------------------------------------------------------------------------------
/quantum/images/New.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/images/New.gif
--------------------------------------------------------------------------------
/quantum/images/Plus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/images/Plus.png
--------------------------------------------------------------------------------
/quantum/images/fxos.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/images/fxos.ico
--------------------------------------------------------------------------------
/quantum/images/grain.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/images/grain.png
--------------------------------------------------------------------------------
/quantum/images/tab.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/images/tab.png
--------------------------------------------------------------------------------
/quantum/modevlib/threads/README.md:
--------------------------------------------------------------------------------
1 |
2 | See main project https://github.com/mozilla/jsThreads
3 |
--------------------------------------------------------------------------------
/quantum/images/Remove.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/images/Remove.png
--------------------------------------------------------------------------------
/quantum/images/bg-sand.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/images/bg-sand.png
--------------------------------------------------------------------------------
/quantum/images/spinner.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/images/spinner.gif
--------------------------------------------------------------------------------
/quantum/images/Spreadsheet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/images/Spreadsheet.png
--------------------------------------------------------------------------------
/quantum/images/bg-gradient-sand.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/images/bg-gradient-sand.png
--------------------------------------------------------------------------------
/quantum/css/OpenSans-Bold-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/css/OpenSans-Bold-webfont.eot
--------------------------------------------------------------------------------
/quantum/css/OpenSans-Bold-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/css/OpenSans-Bold-webfont.ttf
--------------------------------------------------------------------------------
/quantum/css/OpenSans-Bold-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/css/OpenSans-Bold-webfont.woff
--------------------------------------------------------------------------------
/quantum/css/OpenSans-Light-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/css/OpenSans-Light-webfont.eot
--------------------------------------------------------------------------------
/quantum/css/OpenSans-Light-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/css/OpenSans-Light-webfont.ttf
--------------------------------------------------------------------------------
/quantum/css/OpenSans-Light-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/css/OpenSans-Light-webfont.woff
--------------------------------------------------------------------------------
/quantum/lib/jstree/themes/apple/bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/lib/jstree/themes/apple/bg.jpg
--------------------------------------------------------------------------------
/quantum/lib/jstree/themes/apple/d.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/lib/jstree/themes/apple/d.png
--------------------------------------------------------------------------------
/quantum/lib/jstree/themes/classic/d.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/lib/jstree/themes/classic/d.gif
--------------------------------------------------------------------------------
/quantum/lib/jstree/themes/classic/d.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/lib/jstree/themes/classic/d.png
--------------------------------------------------------------------------------
/quantum/lib/jstree/themes/default/d.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/lib/jstree/themes/default/d.gif
--------------------------------------------------------------------------------
/quantum/lib/jstree/themes/default/d.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/lib/jstree/themes/default/d.png
--------------------------------------------------------------------------------
/quantum/modevlib/gui/Progress.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | (function(){
4 |
5 | //
6 |
7 |
8 |
9 |
10 |
11 |
12 | })();
13 |
--------------------------------------------------------------------------------
/quantum/lib/ccc/pvc/_namespace.pvc.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Namespace with protovis chart components.
3 | * @name pvc
4 | * @namespace
5 | */
--------------------------------------------------------------------------------
/quantum/lib/metrics-graphics/.jshintignore:
--------------------------------------------------------------------------------
1 | src/js/common/bootstrap_tooltip_popover.js
2 | src/js/layout/bootstrap_dropdown.js
3 |
--------------------------------------------------------------------------------
/quantum/lib/ccc/pvc/pvcBarPanel.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Bar Panel.
3 | */
4 | def
5 | .type('pvc.BarPanel', pvc.BarAbstractPanel)
6 | .add({
7 | });
--------------------------------------------------------------------------------
/quantum/lib/jstree/themes/apple/throbber.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/lib/jstree/themes/apple/throbber.gif
--------------------------------------------------------------------------------
/quantum/lib/jstree/themes/default-rtl/d.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/lib/jstree/themes/default-rtl/d.gif
--------------------------------------------------------------------------------
/quantum/lib/jstree/themes/default-rtl/d.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/lib/jstree/themes/default-rtl/d.png
--------------------------------------------------------------------------------
/quantum/lib/jstree/themes/apple/dot_for_ie.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/lib/jstree/themes/apple/dot_for_ie.gif
--------------------------------------------------------------------------------
/quantum/lib/jstree/themes/classic/throbber.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/lib/jstree/themes/classic/throbber.gif
--------------------------------------------------------------------------------
/quantum/lib/jstree/themes/default-rtl/dots.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/lib/jstree/themes/default-rtl/dots.gif
--------------------------------------------------------------------------------
/quantum/lib/jstree/themes/default/throbber.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/lib/jstree/themes/default/throbber.gif
--------------------------------------------------------------------------------
/quantum/lib/jstree/themes/classic/dot_for_ie.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/lib/jstree/themes/classic/dot_for_ie.gif
--------------------------------------------------------------------------------
/quantum/lib/jstree/themes/default-rtl/throbber.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/lib/jstree/themes/default-rtl/throbber.gif
--------------------------------------------------------------------------------
/quantum/lib/metrics-graphics/examples/images/divider.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/lib/metrics-graphics/examples/images/divider.png
--------------------------------------------------------------------------------
/quantum/lib/metrics-graphics/examples/images/og-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/lib/metrics-graphics/examples/images/og-logo.png
--------------------------------------------------------------------------------
/quantum/lib/jquery-ui/css/start/images/animated-overlay.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/lib/jquery-ui/css/start/images/animated-overlay.gif
--------------------------------------------------------------------------------
/quantum/lib/jquery-ui/css/start/images/ui-icons_0078ae_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/lib/jquery-ui/css/start/images/ui-icons_0078ae_256x240.png
--------------------------------------------------------------------------------
/quantum/lib/jquery-ui/css/start/images/ui-icons_056b93_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/lib/jquery-ui/css/start/images/ui-icons_056b93_256x240.png
--------------------------------------------------------------------------------
/quantum/lib/jquery-ui/css/start/images/ui-icons_d8e7f3_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/lib/jquery-ui/css/start/images/ui-icons_d8e7f3_256x240.png
--------------------------------------------------------------------------------
/quantum/lib/jquery-ui/css/start/images/ui-icons_e0fdff_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/lib/jquery-ui/css/start/images/ui-icons_e0fdff_256x240.png
--------------------------------------------------------------------------------
/quantum/lib/jquery-ui/css/start/images/ui-icons_f5e175_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/lib/jquery-ui/css/start/images/ui-icons_f5e175_256x240.png
--------------------------------------------------------------------------------
/quantum/lib/jquery-ui/css/start/images/ui-icons_f7a50d_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/lib/jquery-ui/css/start/images/ui-icons_f7a50d_256x240.png
--------------------------------------------------------------------------------
/quantum/lib/jquery-ui/css/start/images/ui-icons_fcd113_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/lib/jquery-ui/css/start/images/ui-icons_fcd113_256x240.png
--------------------------------------------------------------------------------
/quantum/lib/jquery-ui/css/start/images/ui-bg_flat_55_999999_40x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/lib/jquery-ui/css/start/images/ui-bg_flat_55_999999_40x100.png
--------------------------------------------------------------------------------
/quantum/lib/jquery-ui/css/start/images/ui-bg_flat_75_aaaaaa_40x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/lib/jquery-ui/css/start/images/ui-bg_flat_75_aaaaaa_40x100.png
--------------------------------------------------------------------------------
/quantum/lib/jquery-ui/css/start/images/ui-bg_glass_45_0078ae_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/lib/jquery-ui/css/start/images/ui-bg_glass_45_0078ae_1x400.png
--------------------------------------------------------------------------------
/quantum/lib/jquery-ui/css/start/images/ui-bg_glass_55_f8da4e_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/lib/jquery-ui/css/start/images/ui-bg_glass_55_f8da4e_1x400.png
--------------------------------------------------------------------------------
/quantum/lib/jquery-ui/css/start/images/ui-bg_glass_75_79c9ec_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/lib/jquery-ui/css/start/images/ui-bg_glass_75_79c9ec_1x400.png
--------------------------------------------------------------------------------
/quantum/lib/jquery-ui/css/start/images/ui-bg_inset-hard_100_fcfdfd_1x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/lib/jquery-ui/css/start/images/ui-bg_inset-hard_100_fcfdfd_1x100.png
--------------------------------------------------------------------------------
/quantum/lib/jquery-ui/css/start/images/ui-bg_gloss-wave_45_e14f1c_500x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/lib/jquery-ui/css/start/images/ui-bg_gloss-wave_45_e14f1c_500x100.png
--------------------------------------------------------------------------------
/quantum/lib/jquery-ui/css/start/images/ui-bg_gloss-wave_50_6eac2c_500x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/lib/jquery-ui/css/start/images/ui-bg_gloss-wave_50_6eac2c_500x100.png
--------------------------------------------------------------------------------
/quantum/lib/jquery-ui/css/start/images/ui-bg_gloss-wave_75_2191c0_500x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mozilla/charts/HEAD/quantum/lib/jquery-ui/css/start/images/ui-bg_gloss-wave_75_2191c0_500x100.png
--------------------------------------------------------------------------------
/quantum/modevlib/gui/README.md:
--------------------------------------------------------------------------------
1 |
2 | There are serious issues with this directory of classes.
3 |
4 | * GUI.js is responsible for some of the simpler GUI parameter inputs. These should be broken out into their own classes.
5 |
--------------------------------------------------------------------------------
/quantum/lib/metrics-graphics/.gitignore:
--------------------------------------------------------------------------------
1 | bower_components
2 | node_modules
3 |
4 | other/divider.psd
5 |
6 | other/htaccess.txt
7 |
8 | .DS_Store
9 |
10 | bare.html
11 | /.svn
12 | .idea
13 | *.iml
14 | libs
15 | import.js
16 | npm-debug.log
17 |
--------------------------------------------------------------------------------
/quantum/lib/metrics-graphics/src/js/common/register.js:
--------------------------------------------------------------------------------
1 | function register(chartType, descriptor, defaults) {
2 | MG.charts[chartType] = {
3 | descriptor: descriptor,
4 | defaults: defaults || {}
5 | };
6 | }
7 |
8 | MG.register = register;
9 |
--------------------------------------------------------------------------------
/quantum/lib/ccc/pvc/pvcNormalizedBarPanel.js:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * Normalized Bar Panel.
4 | */
5 | def
6 | .type('pvc.NormalizedBarPanel', pvc.BarAbstractPanel)
7 | .add({
8 | _barVerticalMode: function(){
9 | return 'expand';
10 | }
11 | });
--------------------------------------------------------------------------------
/quantum/lib/metrics-graphics/.jshintrc:
--------------------------------------------------------------------------------
1 | {
2 | "globals": {
3 | "$": false,
4 | "jQuery": false,
5 | "MG": false,
6 | "d3": false
7 | },
8 | "laxbreak": true,
9 | "validthis": true,
10 | "loopfunc": true,
11 | "sub": true
12 | }
13 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .svn
2 | .git
3 | .idea
4 | *.iml
5 | out
6 | html/es/lib/jstree/_lib
7 | html/es/lib/jstree/_docs
8 | html/es/lib/jstree/_demo
9 | /docs/2.1 vs 2.0 as of 2014-09-08.xlsx
10 | /docs/2.1 vs 2.0.xlsx
11 | /tests/__pycache__
12 | /tests/*.pyc
13 | /.env
14 |
--------------------------------------------------------------------------------
/quantum/lib/metrics-graphics/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - "0.10"
4 | script: npm run test-ci
5 | notifications:
6 | irc:
7 | channels:
8 | - "irc.mozilla.org#metrics"
9 | on_success: change
10 | on_failure: always
11 | use_notice: true
12 |
--------------------------------------------------------------------------------
/quantum/lib/ccc/pvc/pvcCategoricalAbstractPanel.js:
--------------------------------------------------------------------------------
1 |
2 | def
3 | .type('pvc.CategoricalAbstractPanel', pvc.CartesianAbstractPanel)
4 | .init(function(chart, parent, plot, options){
5 |
6 | this.base(chart, parent, plot, options);
7 |
8 | this.stacked = plot.option('Stacked');
9 | });
--------------------------------------------------------------------------------
/quantum/modevlib/util/aTest.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | importScript("../debug/aLog.js");
4 |
5 | assert = {};
6 |
7 | (function(){
8 |
9 | assert.equal = function(test, expected, errorMessage){
10 | if (test==expected) return;
11 |
12 | Log.error(errorMessage);
13 | };
14 |
15 |
16 |
17 |
18 | })();
19 |
--------------------------------------------------------------------------------
/quantum/lib/ccc/pvc/visual/plot/BarPlot.js:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * Initializes a bar plot.
4 | *
5 | * @name pvc.visual.BarPlot
6 | * @class Represents a bar plot.
7 | * @extends pvc.visual.BarPlotAbstract
8 | */
9 | def
10 | .type('pvc.visual.BarPlot', pvc.visual.BarPlotAbstract)
11 | .add({
12 | type: 'bar'
13 | });
--------------------------------------------------------------------------------
/quantum/js/chart_lib.js:
--------------------------------------------------------------------------------
1 |
2 | importScript([
3 | '../modevlib/main.js',
4 | '../modevlib/Dimension-Bugzilla.js',
5 | "../modevlib/Dimension-Quantum.js",
6 | "../js/grid.js",
7 | "../modevlib/gui/accordion.js",
8 | "../modevlib/gui/dynamic.js",
9 | "../modevlib/gui/aColor.js",
10 | "blockerCharts.js",
11 | "nominationCharts.js",
12 | "regressionCharts.js",
13 | "blockers.css"
14 | ]);
15 |
--------------------------------------------------------------------------------
/quantum/modevlib/util/aHTML.js:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 |
5 |
6 |
7 | //REPRESENT RAW HTML
8 | function HTML(html){
9 | this.html=html;
10 | }
11 |
12 | HTML.prototype.toString=function HTML_toString(){
13 | return this.html;
14 | };
15 |
16 |
17 |
--------------------------------------------------------------------------------
/quantum/modevlib/util/aParse.js:
--------------------------------------------------------------------------------
1 |
2 | parse = {};
3 |
4 | parse.URL = function parseURL(url){
5 | var parser = document.createElement('a');
6 | parser.href = url;
7 | return {
8 | "scheme": parser.protocol,
9 | "host": parser.hostname,
10 | "port": convert.String2Integer(parser.port),
11 | "path": parser.pathname,
12 | "params": convert.URLParam2Object(parser.search.slice(1)),
13 | "fragment": convert.URLParam2Object(parser.hash.slice(1))
14 | };
15 | };
16 |
--------------------------------------------------------------------------------
/quantum/lib/metrics-graphics/tests/misc/process_test.js:
--------------------------------------------------------------------------------
1 | module('process');
2 |
3 | test('args.missing_is_zero doesn\'t throw a "args.data[0][0] is undefined" error', function() {
4 | var data = [{"date": new Date('2014-02-02'), "value": 6}];
5 | var params = {
6 | data: data,
7 | target: "#qunit-fixture",
8 | missing_is_zero: true
9 | };
10 |
11 | MG.data_graphic(params);
12 |
13 | equal(params.data.length, 1, 'args.data is defined');
14 | });
--------------------------------------------------------------------------------
/quantum/lib/ccc/pvc/visual/CartesianAxisRootScene.js:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * Initializes an axis root scene.
4 | *
5 | * @name pvc.visual.CartesianAxisRootScene
6 | *
7 | * @extends pvc.visual.Scene
8 | *
9 | * @constructor
10 | * @param {pvc.visual.Scene} [parent] The parent scene, if any.
11 | * @param {object} [keyArgs] Keyword arguments.
12 | * See {@link pvc.visual.Scene} for supported keyword arguments.
13 | */
14 | def
15 | .type('pvc.visual.CartesianAxisRootScene', pvc.visual.Scene);
--------------------------------------------------------------------------------
/quantum/lib/metrics-graphics/examples/css/metricsgraphics-demo-accessible.css:
--------------------------------------------------------------------------------
1 | html {
2 | font-size: 16px;
3 | }
4 |
5 | .mg-x-axis text,
6 | .mg-y-axis text,
7 | .mg-histogram .axis text {
8 | opacity: 0.9;
9 | }
10 |
11 | .mg-x-axis line,
12 | .mg-y-axis line {
13 | opacity: 1;
14 | }
15 |
16 | .mg-markers text,
17 | .mg-year-marker text,
18 | .mg-baselines text {
19 | opacity: 0.9;
20 | }
21 |
22 | .mg-markers line,
23 | .mg-year-marker line,
24 | .mg-baselines line {
25 | opacity: 1;
26 | }
--------------------------------------------------------------------------------
/quantum/lib/metrics-graphics/examples/css/addons/mg_line_brushing.css:
--------------------------------------------------------------------------------
1 | .mg-brush-container {
2 | cursor: crosshair; }
3 |
4 | .mg-brush-container.mg-brushing {
5 | cursor: ew-resize; }
6 |
7 | .mg-brushed, .mg-brushed * {
8 | cursor: zoom-out !important; }
9 |
10 | .mg-brush rect.mg-extent {
11 | fill: rgba(0, 0, 0, 0.3); }
12 |
13 | .mg-brushing-in-progress {
14 | -webkit-touch-callout: none;
15 | -webkit-user-select: none;
16 | -khtml-user-select: none;
17 | -moz-user-select: none;
18 | -ms-user-select: none;
19 | user-select: none; }
20 |
--------------------------------------------------------------------------------
/quantum/lib/metrics-graphics/tests/helpers.js:
--------------------------------------------------------------------------------
1 | function generateMouseEvent(type) {
2 | var event = document.createEvent('MouseEvent');
3 | event.initEvent(type, true, true);
4 | return event;
5 | }
6 |
7 | // essentially the same as $.extend
8 | function extend(){
9 | var result = {},
10 | $__arguments = [].slice.call(arguments);
11 |
12 | $__arguments.forEach(function(obj) {
13 | for (var prop in obj) {
14 | if (obj.hasOwnProperty(prop)) {
15 | result[prop] = obj[prop];
16 | }
17 | }
18 | });
19 | return result;
20 | }
21 |
--------------------------------------------------------------------------------
/quantum/modevlib/main.js:
--------------------------------------------------------------------------------
1 |
2 | importScript("aLibrary.js");
3 | importScript("Settings.js");
4 |
5 | importScript("MozillaPrograms.js");
6 | importScript("rest/BugzillaClient.js");
7 | importScript("rest/ElasticSearch.js");
8 | importScript("qb/ActiveDataQuery.js");
9 | importScript("Bugzilla.js");
10 | importScript("charts/cccChart.js");
11 | importScript("charts/aColor.js");
12 | importScript([
13 | "gui/GUI.js",
14 | "../css/menu.css"
15 | ]);
16 | importScript("Hierarchy.js");
17 | importScript("math/Stats.js");
18 | importScript("qb/qb.js");
19 | importScript("ScrumBugs.js");
20 |
21 |
--------------------------------------------------------------------------------
/quantum/lib/metrics-graphics/src/js/misc/error.js:
--------------------------------------------------------------------------------
1 | // call this to add a warning icon to a graph and log an error to the console
2 | function error(args) {
3 | console.error('ERROR : ', args.target, ' : ', args.error);
4 |
5 | d3.select(args.target).select('.mg-chart-title')
6 | .append('tspan')
7 | .attr('class', 'fa fa-x fa-exclamation-circle mg-warning')
8 | .attr('dx', '0.3em')
9 | .text('\uf06a');
10 | }
11 |
12 | function internal_error(args) {
13 | console.error('INTERNAL ERROR : ', args.target, ' : ', args.internal_error);
14 | }
15 |
16 | MG.error = error;
17 |
--------------------------------------------------------------------------------
/quantum/modevlib/aLibrary.js:
--------------------------------------------------------------------------------
1 | importScript("util/aUtil.js");
2 | importScript("collections/aArray.js");
3 | importScript("collections/aQueue.js");
4 | importScript("collections/aSet.js");
5 | importScript("collections/aRelation.js");
6 | importScript("math/aMath.js");
7 | importScript("util/aString.js");
8 | importScript("util/aHTML.js");
9 | importScript("util/convert.js");
10 | importScript("util/aDate.js");
11 | importScript("util/aDuration.js");
12 | importScript("util/aTimer.js");
13 | importScript("util/aTemplate.js");
14 |
15 |
16 | importScript([
17 | "debug/aLog.js",
18 | "threads/thread.js"
19 | ]);
20 |
--------------------------------------------------------------------------------
/quantum/lib/metrics-graphics/examples/data/neg2.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "measure": 43.34,
4 | "subject": 32.0
5 | },
6 | {
7 | "measure": 53.3423,
8 | "subject": 20.27
9 | },
10 | {
11 | "measure": -10.343,
12 | "subject": 12.42
13 | },
14 | {
15 | "measure": -1,
16 | "subject": -1.69
17 | },
18 | {
19 | "measure": 10,
20 | "subject": -10.01
21 | },
22 | {
23 | "measure": 25,
24 | "subject": -21.59
25 | },
26 | {
27 | "measure": -20.343,
28 | "subject": -31.86
29 | }
30 | ]
--------------------------------------------------------------------------------
/quantum/lib/metrics-graphics/examples/data/small-range.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "date": "2014-01-01",
4 | "value": 1
5 | },
6 | {
7 | "date": "2014-01-02",
8 | "value": 3
9 | },
10 | {
11 | "date": "2014-01-03",
12 | "value": 2
13 | },
14 | {
15 | "date": "2014-01-04",
16 | "value": 2
17 | },
18 | {
19 | "date": "2014-01-05",
20 | "value": 2
21 | },
22 | {
23 | "date": "2014-01-06",
24 | "value": 1
25 | }
26 | ]
27 |
--------------------------------------------------------------------------------
/quantum/modevlib/.editorconfig:
--------------------------------------------------------------------------------
1 | # EditorConfig helps developers define and maintain consistent
2 | # coding styles between different editors and IDEs
3 | # editorconfig.org
4 |
5 | [*]
6 | end_of_line = lf
7 | charset = utf-8
8 | trim_trailing_whitespace = true
9 | insert_final_newline = true
10 | indent_style = space
11 | indent_size = 2
12 |
13 | [*.js]
14 | indent_style = tab
15 | indent_size = 4
16 |
17 | [*.json]
18 | indent_style = tab
19 | indent_size = 4
20 |
21 | [*.css]
22 | indent_style = tab
23 | indent_size = 4
24 |
25 | [*.html]
26 | indent_style = tab
27 | indent_size = 4
28 |
29 | [*.{diff,md}]
30 | trim_trailing_whitespace = false
31 |
--------------------------------------------------------------------------------
/quantum/lib/metrics-graphics/examples/data/xnotdate.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "males": 50,
4 | "females": 12
5 | },
6 | {
7 | "males": 95,
8 | "females": 66
9 | },
10 | {
11 | "males": 143,
12 | "females": 89
13 | },
14 | {
15 | "males": 198,
16 | "females": 105
17 | },
18 | {
19 | "males": 244,
20 | "females": 533
21 | },
22 | {
23 | "males": 277,
24 | "females": 175
25 | },
26 | {
27 | "males": 344,
28 | "females": 401
29 | },
30 | {
31 | "males": 441,
32 | "females": 1299
33 | }
34 | ]
35 |
--------------------------------------------------------------------------------
/quantum/.editorconfig:
--------------------------------------------------------------------------------
1 | # EditorConfig helps developers define and maintain consistent
2 | # coding styles between different editors and IDEs
3 | # editorconfig.org
4 |
5 | root = true
6 |
7 | [*]
8 | end_of_line = lf
9 | charset = utf-8
10 | trim_trailing_whitespace = true
11 | insert_final_newline = true
12 | indent_style = space
13 | indent_size = 4
14 |
15 | [*.js]
16 | indent_style = space
17 | indent_size = 2
18 |
19 | [*.json]
20 | indent_style = tab
21 | indent_size = 2
22 |
23 | [*.css]
24 | indent_style = space
25 | indent_size = 4
26 |
27 | [*.html]
28 | indent_style = space
29 | indent_size = 2
30 |
31 | [*.{diff,md}]
32 | trim_trailing_whitespace = false
33 |
--------------------------------------------------------------------------------
/quantum/modevlib/aFormat.js:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | importScript([
6 | "util/aString.js",
7 | "../lib/jquery.js",
8 | "../lib/jquery.numberformatter.js"
9 | ]);
10 |
11 | var aFormat={};
12 |
13 |
14 | (function(){
15 | aFormat.number=function(value, format){
16 | if (format.trim().left(1)=="+"){
17 | //FORCE PLUS SIGN
18 | if (value<=0) format="+"+format.rightBut(1);
19 | }//endif
20 |
21 | return $.formatNumber(value, {"format":format});
22 | };//method
23 |
24 |
25 | aFormat.json=function(json){
26 | if (typeof(json)!="string") return convert.value2json(json);
27 | return convert.value2json(convert.json2value(json));
28 | };//method
29 |
30 | })();
31 |
--------------------------------------------------------------------------------
/quantum/lib/metrics-graphics/.editorconfig:
--------------------------------------------------------------------------------
1 | # EditorConfig helps developers define and maintain consistent
2 | # coding styles between different editors and IDEs
3 | # editorconfig.org
4 |
5 | root = true
6 |
7 | [*]
8 | end_of_line = lf
9 | charset = utf-8
10 | trim_trailing_whitespace = true
11 | insert_final_newline = true
12 | indent_style = space
13 | indent_size = 4
14 |
15 | [*.js]
16 | indent_style = space
17 | indent_size = 2
18 |
19 | [*.hbs]
20 | indent_style = space
21 | indent_size = 4
22 |
23 | [*.css]
24 | indent_style = space
25 | indent_size = 4
26 |
27 | [*.html]
28 | indent_style = space
29 | indent_size = 4
30 |
31 | [*.{diff,md}]
32 | trim_trailing_whitespace = false
33 |
--------------------------------------------------------------------------------
/quantum/lib/ccc/pvc/visual/plot/BulletPlot.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Initializes a bullet plot.
3 | *
4 | * @name pvc.visual.BulletPlot
5 | * @class Represents a bullet plot.
6 | * @extends pvc.visual.Plot
7 | */
8 | def
9 | .type('pvc.visual.BulletPlot', pvc.visual.Plot)
10 | .add({
11 | type: 'bullet',
12 |
13 | _getOptionsDefinition: function(){
14 | return pvc.visual.BulletPlot.optionsDef;
15 | }
16 | });
17 |
18 | pvc.visual.BulletPlot.optionsDef = def.create(
19 | pvc.visual.Plot.optionsDef, {
20 | ValuesVisible: { // override
21 | value: true
22 | },
23 |
24 | ColorRole: {
25 | value: null
26 | }
27 | });
--------------------------------------------------------------------------------
/quantum/js/main_lib.js:
--------------------------------------------------------------------------------
1 |
2 | importScript("../modevlib/aLibrary.js");
3 | importScript("../modevlib/Settings.js");
4 |
5 | importScript("../modevlib/rest/BugzillaClient.js");
6 | importScript("../modevlib/rest/ElasticSearch.js");
7 | importScript("../modevlib/qb/ESQuery.js");
8 | importScript("../modevlib/Bugzilla.js");
9 | importScript([
10 | "../modevlib/gui/GUI.js",
11 | "../css/menu.css"
12 | ]);
13 |
14 | importScript("../modevlib/math/Stats.js");
15 | importScript("../modevlib/qb/qb.js");
16 |
17 | importScript([
18 | 'blockers.css',
19 | '../modevlib/Dimension-Bugzilla.js',
20 | "../modevlib/Dimension-Quantum.js",
21 | "../modevlib/charts/aColor.js",
22 | "hierarchy.js",
23 | "heat.js"
24 | ]);
25 |
26 |
--------------------------------------------------------------------------------
/quantum/lib/ccc/pvc/pvcTitlePanel.js:
--------------------------------------------------------------------------------
1 |
2 | def
3 | .type('pvc.TitlePanel', pvc.TitlePanelAbstract)
4 | .init(function(chart, parent, options){
5 |
6 | if(!options){
7 | options = {};
8 | }
9 |
10 | var isV1Compat = chart.compatVersion() <= 1;
11 | if(isV1Compat){
12 | var size = options.titleSize;
13 | if(size == null){
14 | options.titleSize = 25;
15 | }
16 | }
17 |
18 | // Must be done before calling base, cause it uses _getExtension
19 | this._extensionPrefix = !chart.parent ? "title" : "smallTitle";
20 |
21 | this.base(chart, parent, options);
22 | })
23 | .add({
24 |
25 | font: "14px sans-serif",
26 |
27 | defaultPaddings: 4
28 | });
--------------------------------------------------------------------------------
/quantum/lib/ccc/pvc/visual/sign/Label.js:
--------------------------------------------------------------------------------
1 |
2 | def.type('pvc.visual.Label', pvc.visual.Sign)
3 | .init(function(panel, protoMark, keyArgs){
4 |
5 | var pvMark = protoMark.add(pv.Label);
6 |
7 | this.base(panel, pvMark, keyArgs);
8 | })
9 | .add({
10 | _addInteractive: function(keyArgs){
11 | keyArgs = def.setDefaults(keyArgs,
12 | 'noSelect', true,
13 | 'noHover', true,
14 | 'noTooltip', true,
15 | 'noClick', true,
16 | 'noDoubleClick', true);
17 |
18 | this.base(keyArgs);
19 | },
20 |
21 | defaultColor: function(type){
22 | return pv.Color.names.black;
23 | }
24 | });
--------------------------------------------------------------------------------
/quantum/lib/ccc/pvc/visual/CartesianAxisTickScene.js:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * Initializes an axis tick scene.
4 | *
5 | * @name pvc.visual.CartesianAxisTickScene
6 | *
7 | * @extends pvc.visual.Scene
8 | *
9 | * @constructor
10 | * @param {pvc.visual.CartesianAxisRootScene} [parent] The parent scene, if any.
11 | * @param {object} [keyArgs] Keyword arguments.
12 | * See {@link pvc.visual.Scene} for supported keyword arguments.
13 | */
14 | def
15 | .type('pvc.visual.CartesianAxisTickScene', pvc.visual.Scene)
16 | .init(function(parent, keyArgs){
17 |
18 | this.base(parent, keyArgs);
19 |
20 | this.vars.tick = new pvc.visual.ValueLabelVar(
21 | def.get(keyArgs, 'tick'),
22 | def.get(keyArgs, 'tickLabel'),
23 | def.get(keyArgs, 'tickRaw'));
24 | });
--------------------------------------------------------------------------------
/quantum/lib/ccc/pvc/visual/sign/Panel.js:
--------------------------------------------------------------------------------
1 |
2 | def.type('pvc.visual.Panel', pvc.visual.Sign)
3 | .init(function(panel, protoMark, keyArgs){
4 | var pvPanel = def.get(keyArgs, 'panel');
5 | if(!pvPanel){
6 | var pvPanelType = def.get(keyArgs, 'panelType') || pv.Panel;
7 |
8 | pvPanel = protoMark.add(pvPanelType);
9 | }
10 |
11 | this.base(panel, pvPanel, keyArgs);
12 | })
13 | .add({
14 | _addInteractive: function(keyArgs){
15 | var t = true;
16 | keyArgs = def.setDefaults(keyArgs,
17 | 'noSelect', t,
18 | 'noHover', t,
19 | 'noTooltip', t,
20 | 'noClick', t,
21 | 'noDoubleClick', t);
22 |
23 | this.base(keyArgs);
24 | }
25 | });
--------------------------------------------------------------------------------
/quantum/modevlib/charts/README.md:
--------------------------------------------------------------------------------
1 | Proposed Chart API
2 | ==================
3 |
4 | Yet another chart API! The priorities are:
5 |
6 | 1. No magic labels or prefixes - A surprising number APIs use a concatenation-
7 | of-names to inject parameter values. We will perfer the use of objects for compound values.
8 | 2. Use CSS style names - except when CSS names break rule #1
9 | 3. `data` is assumed to be an Array of Objects, or a qb query result.
10 | 4. `value` is can be a property name, or a qb expression
11 |
12 | If two, or more, charts share the same `axis` (as in `===`), they are
13 | considered *linked*, and act as a single chart. Use the [`$ref` property](https://github.com/klahnakoski/pyLibrary/tree/dev/pyLibrary/jsons#) to
14 | define a shared axis.
15 |
16 |
17 | [Link to the chart schema](chartSchema.md)
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/quantum/lib/ccc/pvc/visual/plot/NormalizedBarPlot.js:
--------------------------------------------------------------------------------
1 | def.scope(function(){
2 |
3 | /**
4 | * Initializes a normalized bar plot.
5 | *
6 | * @name pvc.visual.NormalizedBarPlot
7 | * @class Represents a normalized bar plot.
8 | * @extends pvc.visual.BarPlotAbstract
9 | */
10 | def
11 | .type('pvc.visual.NormalizedBarPlot', pvc.visual.BarPlotAbstract)
12 | .add({
13 | type: 'bar',
14 | _getOptionsDefinition: function(){
15 | return pvc.visual.NormalizedBarPlot.optionsDef;
16 | }
17 | });
18 |
19 | pvc.visual.NormalizedBarPlot.optionsDef = def.create(
20 | pvc.visual.BarPlotAbstract.optionsDef,
21 | {
22 | Stacked: {
23 | resolve: null,
24 | value: true
25 | }
26 | });
27 | });
--------------------------------------------------------------------------------
/quantum/lib/ccc/pvc/pvcPlotBgPanel.js:
--------------------------------------------------------------------------------
1 |
2 | def
3 | .type('pvc.PlotBgPanel', pvc.BasePanel)
4 | .init(function(chart, parent, options) {
5 | // Prevent the border from affecting the box model,
6 | // providing a static 0 value, independently of the actual drawn value...
7 | //this.borderWidth = 0;
8 |
9 | this.base(chart, parent, options);
10 |
11 | //this._extensionPrefix = "plotBg";
12 | })
13 | .add({
14 | anchor: 'fill',
15 |
16 | _getExtensionId: function(){
17 | return 'plotBg';
18 | },
19 |
20 | _createCore: function(layoutInfo) {
21 | // Send the panel behind grid rules
22 | this.pvPanel
23 | .borderPanel
24 | .lock('zOrder', -13)
25 | .antialias(false)
26 | ;
27 |
28 | this.base(layoutInfo);
29 | }
30 | });
--------------------------------------------------------------------------------
/quantum/lib/metrics-graphics/examples/data/missing-y.json:
--------------------------------------------------------------------------------
1 |
2 | [
3 | {
4 | "date": "2014-01-08",
5 | "value": 500
6 | },
7 | {
8 | "date": "2014-01-12",
9 | "value": 500
10 | },
11 | {
12 | "date": "2014-01-19",
13 | "value": 2000
14 | },
15 | {
16 | "date": "2014-01-20",
17 | "value": 2200
18 | },
19 | {
20 | "date": "2014-01-21",
21 | "value": 2300
22 | },
23 | {
24 | "date": "2014-04-23",
25 | "value": 500
26 | },
27 | {
28 | "date": "2014-04-24",
29 | "value": 1500
30 | },
31 | {
32 | "date": "2014-04-25",
33 | "value": 3000
34 | }
35 | ]
36 |
--------------------------------------------------------------------------------
/quantum/modevlib/util/aTimer.js:
--------------------------------------------------------------------------------
1 | importScript("aDate.js");
2 | importScript("aDuration.js");
3 | importScript("../debug/aLog.js");
4 |
5 |
6 | var aTimer=function(){};
7 |
8 | //PROVIDE warningDuration IF ONLY NEED TO PRINT TIMES LONGER THAN GIVEN
9 | aTimer.start=function(name, warningDuration){
10 | var t=new aTimer();
11 | t.warningDuration=warningDuration==undefined ? undefined : warningDuration.getMilli();
12 | t.name=name;
13 | t.start=window.performance.now();
14 | return t;
15 | };//method
16 |
17 | aTimer.prototype.end=function(){
18 | var end=window.performance.now();
19 | var dur=Duration.newInstance(end-this.start);
20 | if (this.warningDuration===undefined){
21 | Log.note(this.name+" ("+dur.toString()+")");
22 | }else if (dur.getMilli()>this.warningDuration){
23 | Log.warning(this.name+" ("+dur.toString()+")");
24 | }//endif
25 | };//method
26 |
27 | aTimer.prototype.stop=aTimer.prototype.end;
28 |
--------------------------------------------------------------------------------
/quantum/lib/ccc/pvc/pvcAxisTitlePanel.js:
--------------------------------------------------------------------------------
1 |
2 | def
3 | .type('pvc.AxisTitlePanel', pvc.TitlePanelAbstract)
4 | .init(function(chart, parent, axis, options) {
5 |
6 | this.axis = axis;
7 |
8 | this.base(chart, parent, options);
9 |
10 | this._extensionPrefix =
11 | axis
12 | .extensionPrefixes
13 | .map(function(prefix){
14 | return prefix + 'Title';
15 | });
16 | })
17 | .add({
18 | _calcLayout: function(layoutInfo){
19 | var scale = this.axis.scale;
20 | if(!scale || scale.isNull){
21 | return new pvc.Size(0, 0);
22 | }
23 |
24 | return this.base(layoutInfo);
25 | },
26 |
27 | _createCore: function(layoutInfo){
28 | var scale = this.axis.scale;
29 | if(!scale || scale.isNull){
30 | return;
31 | }
32 |
33 | return this.base(layoutInfo);
34 | }
35 | });
36 |
--------------------------------------------------------------------------------
/quantum/lib/metrics-graphics/examples/data/missing-is-hidden.json:
--------------------------------------------------------------------------------
1 |
2 | [
3 | {
4 | "date": "2014-01-08",
5 | "value": 500
6 | },
7 | {
8 | "date": "2014-01-09",
9 | "value": 500
10 | },
11 | {
12 | "date": "2014-01-10",
13 | "value": 400
14 | },
15 | {
16 | "date": "2014-02-12",
17 | "value": 500
18 | },
19 | {
20 | "date": "2014-02-13",
21 | "value": 100
22 | },
23 | {
24 | "date": "2014-02-14",
25 | "value": null
26 | },
27 | {
28 | "date": "2014-02-15",
29 | "value": 30
30 | },
31 | {
32 | "date": "2014-02-16",
33 | "value": 300
34 | },
35 | {
36 | "date": "2014-02-17",
37 | "value": 200
38 | }
39 | ]
40 |
--------------------------------------------------------------------------------
/quantum/lib/ccc/pvc/visual/plot/MetricXYPlot.js:
--------------------------------------------------------------------------------
1 | def.scope(function(){
2 |
3 | /**
4 | * Initializes an abstract metric XY plot.
5 | *
6 | * @name pvc.visual.MetricXYPlot
7 | * @class Represents an abstract metric XY plot.
8 | * @extends pvc.visual.CartesianPlot
9 | */
10 | def
11 | .type('pvc.visual.MetricXYPlot', pvc.visual.CartesianPlot)
12 | .add({
13 | _getOptionsDefinition: function(){
14 | return pvc.visual.MetricXYPlot.optionsDef;
15 | }
16 | });
17 |
18 | pvc.visual.MetricXYPlot.optionsDef = def.create(
19 | pvc.visual.CartesianPlot.optionsDef, {
20 | BaseRole: { // override
21 | value: 'x'
22 | },
23 |
24 | OrthoAxis: { // override -> value 1
25 | resolve: null
26 | },
27 |
28 | OrthoRole: {
29 | value: 'y'
30 | }
31 | });
32 | });
--------------------------------------------------------------------------------
/quantum/lib/ccc/pvc/data/DataOper.js:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * Initializes a data operation.
4 | *
5 | * @name pvc.data.DataOper
6 | *
7 | * @class The base abstract class for a data operation.
8 | * Performs an initial query on the datums of the opertion's link parent
9 | * and hands the final implementation to a derived class.
10 | *
11 | * @property {string} key Set on construction with a value that identifies the operation.
12 | *
13 | * @constructor
14 | *
15 | * @param {pvc.data.Data} linkParent The link parent data.
16 | * @param {object} [keyArgs] Keyword arguments.
17 | */
18 | def.type('pvc.data.DataOper')
19 | .init(function(linkParent, keyArgs){
20 | this._linkParent = linkParent;
21 | }).
22 | add(/** @lends pvc.data.DataOper */{
23 |
24 | key: null,
25 |
26 | /**
27 | * Performs the data operation.
28 | *
29 | * @returns {pvc.data.Data} The resulting root data.
30 | */
31 | execute: def.method({isAbstract: true})
32 | });
33 |
--------------------------------------------------------------------------------
/quantum/modevlib/QuantumFlowBugs.js:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 |
5 |
6 | var QuantumFlowBugs = {
7 | "columns": ["projectName", "attributeName", "attributeValue", "esfilter"],
8 |
9 | "rows": [
10 | ["Quantum Flow - Triage", "status_whiteboard.tokenized", "qf"],
11 | ["Quantum Flow - P1", "status_whiteboard.tokenized", "qf:p1"],
12 | ["Quantum Flow - P3", "status_whiteboard.tokenized", "qf:p3"],
13 | ["Quantum Flow - P5", "status_whiteboard.tokenized", "qf:p5"],
14 | ["Quantum Flow - Investigate", "status_whiteboard.tokenized", "qf:investigate"],
15 | ["Quantum Flow - Investigate - P1", "status_whiteboard.tokenized", "qf:investigate:p1"],
16 | ["Quantum Flow - Meta", "status_whiteboard.tokenized", "qf:meta"],
17 | ["Quantum Flow - N/A", "status_whiteboard.tokenized", "qf-"]
18 | ]
19 | };
20 |
--------------------------------------------------------------------------------
/quantum/modevlib/Dimension-Jobs.js:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 |
5 | importScript("Dimension.js");
6 |
7 | if (!Mozilla) var Mozilla = {"name": "Mozilla", "edges": []};
8 |
9 | (function(){
10 | var pastWeek = {"gt": {"build.date": Date.today().subtract(Duration.MONTH).unix()}};
11 |
12 | Dimension.addEdges(false, Mozilla, [
13 | {"name": "Timings", "index": "jobs.action.timings", "edges": [
14 | {"name": "Platform", "field": "build.platform", "type": "set", "sample": pastWeek, "limit":100},
15 | {"name": "Product", "field": "build.product", "type": "set", "sample": pastWeek, "limit":100},
16 | {"name": "Suite", "field": "run.suite", "type": "set", "sample": pastWeek, "limit":100},
17 | {"name": "Pool", "field": "run.machine.pool", "type": "set", "sample": pastWeek, "limit":100}
18 | ]}
19 | ]);
20 |
21 |
22 | })();
23 |
--------------------------------------------------------------------------------
/quantum/lib/ccc/pvc/visual/plot/CategoricalPlot.js:
--------------------------------------------------------------------------------
1 | def.scope(function(){
2 |
3 | /**
4 | * Initializes an abstract categorical plot.
5 | *
6 | * @name pvc.visual.CategoricalPlot
7 | * @class Represents an abstract categorical plot.
8 | * @extends pvc.visual.CartesianPlot
9 | */
10 | def
11 | .type('pvc.visual.CategoricalPlot', pvc.visual.CartesianPlot)
12 | .add({
13 | _getOptionsDefinition: function(){
14 | return pvc.visual.CategoricalPlot.optionsDef;
15 | }
16 | });
17 |
18 | pvc.visual.CategoricalPlot.optionsDef = def.create(
19 | pvc.visual.CartesianPlot.optionsDef, {
20 |
21 | Stacked: {
22 | resolve: '_resolveFull',
23 | cast: Boolean,
24 | value: false
25 | },
26 |
27 | BaseRole: {
28 | value: 'category'
29 | },
30 |
31 | OrthoRole: { // override
32 | value: 'value'
33 | }
34 | });
35 | });
--------------------------------------------------------------------------------
/quantum/lib/metrics-graphics/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "metrics-graphics",
3 | "main": [
4 | "dist/metricsgraphics.js",
5 | "dist/metricsgraphics.css"
6 | ],
7 | "dependencies": {
8 | "d3": ">=4"
9 | },
10 | "ignore": [
11 | ".DS_Store",
12 | ".git",
13 | ".gitignore",
14 | "examples",
15 | "gulp",
16 | "gulpfile.js",
17 | "index.js",
18 | "node_modules",
19 | "package.json",
20 | "src",
21 | "testem.json",
22 | "tests"
23 | ],
24 | "license": "MPL-2.0",
25 | "authors": [
26 | "Ali Almossawi", "Ali Almossawi (http://twitter.com/alialmossawi)>",
27 | "Hamilton Ulmer", "Hamilton Ulmer (http://twitter.com/hamiltonulmer)>"
28 | ],
29 | "homepage": "http://metricsgraphicsjs.org",
30 | "repository": {
31 | "type": "git",
32 | "url": "git://github.com/mozilla/metrics-graphics.git"
33 | },
34 | "keywords": [
35 | "metrics-graphics",
36 | "metricsgraphicsjs",
37 | "metricsgraphics",
38 | "metricsgraphics.js",
39 | "d3 charts"
40 | ]
41 | }
42 |
--------------------------------------------------------------------------------
/quantum/modevlib/ESQueryRunner.js:
--------------------------------------------------------------------------------
1 |
2 | function ESQueryRunner(query, callback){
3 | Thread.run(function*(){
4 | yield(ESQuery.loadColumns(query));
5 | var cubeQuery = new ESQuery(query);
6 | var data = yield(cubeQuery.run());
7 | callback(data);
8 | });
9 | }//method
10 |
11 | function ESQueryRunMany(queries, callback){
12 | //ASSUME queries IS AN ARRAY
13 | Thread.run(function*(){
14 | //LAUNCH ALL QUERIES
15 | var threads=[];
16 | for(var i=0;i
16 | * The properties of marks created as children of this panel will 17 | * receive a corresponding {@link pvc.visual.legend.BulletItemScene} 18 | * as first argument. 19 | *
20 | * 21 | * @name pvc.visual.legend.BulletItemRenderer#create 22 | * @function 23 | * @param {pvc.LegendPanel} legendPanel the legend panel 24 | * @param {pv.Panel} pvBulletPanel the protovis panel on which bullets are rendered. 25 | * @param {string} extensionPrefix The extension prefix to be used to build extension keys, without underscore. 26 | * @param {function} [wrapper] extension wrapper function to apply to created marks. 27 | * 28 | * @type undefined 29 | */ -------------------------------------------------------------------------------- /quantum/modevlib/Dimension-Performance.js: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 | 5 | importScript("Dimension.js"); 6 | 7 | if (!Mozilla) var Mozilla = {"name": "Mozilla", "edges": []}; 8 | 9 | Dimension.addEdges(false, Mozilla, [ 10 | {"name": "Performance", "index": "perf", "edges": [ 11 | {"name": "Product", "field": "build.product", "type": "set", "limit": 1000}, 12 | {"name": "BuildType", "field": "build.type", "type": "set", "limit": 1000}, 13 | {"name": "Branch", "field": "build.branch", "type": "set", "limit": 1000}, 14 | {"name": "Platform", "field": "build.platform", "type": "set", "limit": 1000}, 15 | { 16 | "name": "OS", 17 | "field": ["run.machine.os", "run.machine.osversion"], 18 | "type": "set", 19 | "limit": 1000 20 | }, 21 | {"name": "Test", "field": ["run.suite", "result.test"], "type": "set", "limit": 1000, "esfilter": {"range": {"build.date": {"gt": Date.today().subtract(Duration.newInstance("month")).getMilli()}}}}, 22 | {"name": "Revision", "field": "build.revision", "type": "uid"} 23 | ]} 24 | ]); 25 | -------------------------------------------------------------------------------- /quantum/js/burndown.js: -------------------------------------------------------------------------------- 1 | function bugDetails(bugs) { 2 | 3 | var hasPriority=false; 4 | 5 | bugs.forall(function (b) { 6 | b.bugLink = Bugzilla.linkToBug(b.bug_id); 7 | hasPriority = hasPriority || (b.status !==undefined && b.status!=null); 8 | }); 9 | 10 | var output = new Template([ 11 | "| ID | ", 14 | "Summary | ", 15 | "Status Owner | ",
16 | hasPriority ? "Priority | " : "", 17 | "Estimate | ", 18 | "
|---|---|---|---|---|
| {{bugLink}} | " + 25 | "{{summary|html}} | " +
26 | "{{status}}: {{owner|html}} | " +
27 | (hasPriority ? "{{priority}} | " : "")+
28 | "{{estimate}} | " +
29 | "
Add a scrollable lined area to a standard TextArea control.
13 | 14 | 34 | 35 | 42 | 43 |Visit http://alan.blog-city.com/jquerylinedtextarea.htm for details and download
44 | 45 | 46 | -------------------------------------------------------------------------------- /quantum/lib/ccc/pvc/pvcAbstract.js: -------------------------------------------------------------------------------- 1 | def 2 | .type('pvc.Abstract') 3 | .init(function(){ 4 | this._syncLog(); 5 | }) 6 | .add({ 7 | invisibleLineWidth: 0.001, 8 | defaultLineWidth: 1.5, 9 | 10 | _logInstanceId: null, 11 | 12 | _syncLog: function(){ 13 | if (pvc.debug && typeof console !== "undefined"){ 14 | var logId = this._getLogInstanceId(); 15 | 16 | ['log', 'info', ['trace', 'debug'], 'error', 'warn', 'group', 'groupEnd'].forEach(function(ps){ 17 | ps = ps instanceof Array ? ps : [ps, ps]; 18 | 19 | pvc._installLog(this, '_' + ps[0], ps[1], logId); 20 | }, this); 21 | } 22 | }, 23 | 24 | _getLogInstanceId: function(){ 25 | return this._logInstanceId || 26 | (this._logInstanceId = this._processLogInstanceId(this._createLogInstanceId())); 27 | }, 28 | 29 | _createLogInstanceId: function(){ 30 | return '' + this.constructor; 31 | }, 32 | 33 | _processLogInstanceId: function(logInstanceId){ 34 | var L = 30; 35 | var s = logInstanceId.substr(0, L); 36 | if(s.length < L){ 37 | s += def.array.create(L - s.length, ' ').join(''); 38 | } 39 | 40 | return "[" + s + "]"; 41 | } 42 | }); 43 | 44 | def.scope(function(){ 45 | var o = pvc.Abstract.prototype; 46 | var syncLogHook = function(){ this._syncLog(); }; 47 | 48 | ['log', 'info', 'trace', 'error', 'warn', 'group', 'groupEnd'].forEach(function(p){ 49 | o['_' + p] = syncLogHook; 50 | }); 51 | }); 52 | 53 | -------------------------------------------------------------------------------- /quantum/modevlib/graph/topologicalSort.js: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // This Source Code Form is subject to the terms of the Mozilla Public 3 | // License, v. 2.0. If a copy of the MPL was not distributed with this 4 | // file, You can obtain one at http://mozilla.org/MPL/2.0/. 5 | //////////////////////////////////////////////////////////////////////////////// 6 | // Author: Kyle Lahnakoski (kyle@lahnakoski.com) 7 | //////////////////////////////////////////////////////////////////////////////// 8 | 9 | 10 | function toposort(edges, nodes){ 11 | /* 12 | edges IS AN ARRAY OF [parent, child] PAIRS 13 | nodes IS AN OPTIONAL ARRAY OF ALL NODES 14 | */ 15 | if (!nodes){ 16 | nodes = uniqueNodes(edges); 17 | }//endif 18 | var numNodes = nodes.length; 19 | var sorted = new Array(numNodes); 20 | var visited = {}; 21 | 22 | function visit(node, i, predecessors){ 23 | if (predecessors.indexOf(node) >= 0) { 24 | Log.error(node + " found in loop" + JSON.stringify(predecessors)) 25 | }//endif 26 | 27 | if (visited[i]) return; 28 | visited[i] = true; 29 | 30 | edges.forEach(function(edge, i){ 31 | if (edge[1] !== node) return; 32 | visit(edge[0], i, predecessors + [node]) 33 | }); 34 | sorted[--numNodes] = node; 35 | }//function 36 | 37 | for(var i=numNodes;i--;){ 38 | if (!visited[i]) visit(nodes[i], i, []) 39 | }//for 40 | return sorted; 41 | } 42 | 43 | function uniqueNodes(arr){ 44 | var res = []; 45 | arr.forEach(function(edge){ 46 | if (!res.contains[edge[0]]) res.push(edge[0]); 47 | if (!res.contains[edge[1]]) res.push(edge[1]); 48 | }); 49 | return res; 50 | }//function 51 | -------------------------------------------------------------------------------- /quantum/lib/metrics-graphics/tests/common/resize_test.js: -------------------------------------------------------------------------------- 1 | module('resize'); 2 | 3 | test("Resize does not leak listeners", function () { 4 | // Instrument window event listener methods 5 | var realWindowAddEventListener = window.addEventListener; 6 | var realWindowRemoveEventListener = window.removeEventListener; 7 | var resizeListeners = []; 8 | 9 | window.addEventListener = function () { 10 | if (arguments[0] === 'resize' && resizeListeners.indexOf(arguments[1]) === -1) { 11 | resizeListeners.push(arguments[1]); 12 | } 13 | realWindowAddEventListener.apply(this, arguments); 14 | } 15 | 16 | window.removeEventListener = function () { 17 | if (arguments[0] === 'resize') { 18 | var index = resizeListeners.indexOf(arguments[1]); 19 | if (index !== -1) { 20 | resizeListeners.splice(index, 1); 21 | } 22 | } 23 | realWindowRemoveEventListener.apply(this, arguments); 24 | } 25 | 26 | var params = { 27 | target: '#qunit-fixture', 28 | full_width: true, 29 | data: [{'date': new Date('2014-11-01'), 'value': 12}, 30 | {'date': new Date('2014-11-02'), 'value': 18}], 31 | height: 100 32 | }; 33 | MG.data_graphic(params); 34 | var listenerCountAfterOne = resizeListeners.length; 35 | const REPEAT_CREATE = 20; 36 | for (var i = 0; i < REPEAT_CREATE; i++) { 37 | MG.data_graphic(params); 38 | } 39 | equal(resizeListeners.length, listenerCountAfterOne, "Listener count constant after chart recreated " + REPEAT_CREATE + " times"); 40 | 41 | // Restore default methods 42 | window.addEventListener = realWindowAddEventListener; 43 | window.removeEventListener = realWindowRemoveEventListener; 44 | }); 45 | -------------------------------------------------------------------------------- /quantum/lib/jquery-linedtextarea/jquery-linedtextarea.css: -------------------------------------------------------------------------------- 1 | /** 2 | * jQuery Lined Textarea Plugin 3 | * http://alan.blog-city.com/jquerylinedtextarea.htm 4 | * 5 | * Copyright (c) 2010 Alan Williamson 6 | * 7 | * Contribution done by Ryan Zielke (neoalchemy@gmail.com) 8 | * 9 | * Released under the MIT License: 10 | * http://www.opensource.org/licenses/mit-license.php 11 | * 12 | * Usage: 13 | * Displays a line number count column to the left of the textarea 14 | * 15 | * Class up your textarea with a given class, or target it directly 16 | * with JQuery Selectors 17 | * 18 | * $(".lined").linedtextarea({ 19 | * selectedLine: 10, 20 | * selectedClass: 'lineselect' 21 | * }); 22 | * 23 | */ 24 | 25 | textarea { resize:both; } 26 | 27 | .linedwrap { 28 | border: 1px solid #c0c0c0; 29 | padding: 3px; 30 | display: inline-block; 31 | } 32 | 33 | .linedtextarea { 34 | padding: 0px; 35 | margin: 0px; 36 | } 37 | 38 | .linedtextarea textarea, .linedwrap .codelines .lineno { 39 | font-size: 10pt; 40 | font-family: monospace; 41 | line-height: normal !important; 42 | } 43 | 44 | .linedtextarea textarea { 45 | padding-right:0.3em; 46 | padding-top:0.3em; 47 | border: 0; 48 | } 49 | 50 | .linedwrap .lines { 51 | margin-top: 0px; 52 | width: 50px; 53 | float: left; 54 | overflow: hidden; 55 | border-right: 1px solid #c0c0c0; 56 | margin-right: 10px; 57 | } 58 | 59 | .linedwrap .codelines { 60 | padding-top: 5px; 61 | } 62 | 63 | .linedwrap .codelines .lineno { 64 | color:#AAAAAA; 65 | padding-right: 0.5em; 66 | padding-top: 0.0em; 67 | text-align: right; 68 | white-space: nowrap; 69 | } 70 | 71 | .linedwrap .codelines .lineselect { 72 | color: red; 73 | } 74 | -------------------------------------------------------------------------------- /quantum/modevlib/ScrumBugs.js: -------------------------------------------------------------------------------- 1 | 2 | importScript("aLibrary.js"); 3 | 4 | 5 | var ScrumBugs={}; 6 | 7 | 8 | 9 | (function(){ 10 | var noMatch=[undefined, undefined]; 11 | 12 | var pointsPattern=/[\[\s,]p[=:]([\d\.]+)[ ,\]]/; 13 | var componentPattern=/[\[\s,]c[=:](\w+)[ ,\]]/; 14 | var featurePattern=/[\[\s,](feature|ft)[=:](\w+)[ ,\]]/; 15 | var userPattern=/[\[\s,]u[=:](\w+)[ ,\]]/; 16 | 17 | 18 | function getDates(whiteboard){ 19 | var dates=whiteboard.between("feature=iteration", ")")+")"; 20 | var startDate=Date.newInstance(dates.between("(", "-")); 21 | var endDate=Date.newInstance(dates.between("-", ")")); 22 | 23 | }//method 24 | 25 | 26 | ScrumBugs.parse=function(whiteboard){ 27 | whiteboard=whiteboard+" "; 28 | var output={ 29 | "feature":coalesce(featurePattern.exec(whiteboard), noMatch)[1], 30 | "component":coalesce(componentPattern.exec(whiteboard), noMatch)[1], 31 | "user":coalesce(userPattern.exec(whiteboard), noMatch)[1], 32 | "points":coalesce((pointsPattern.exec(whiteboard)), noMatch)[1] 33 | }; 34 | if (output.feature=="iteration"){ 35 | //feature=iteration (May 02, 2013 - May 23, 2013) 36 | var dates=whiteboard.between("feature=iteration", ")")+")"; 37 | output.startDate=Date.newInstance(dates.between("(", "-")); 38 | output.endDate=Date.newInstance(dates.between("-", ")")); 39 | }//endif 40 | 41 | 42 | return output; 43 | };//method 44 | 45 | var TEST = false; 46 | if (TEST){ 47 | var white = "[est:4d, p=4][coordination]"; 48 | ASSERT(ScrumBugs.parse(white).points == 4, "Wrong"); 49 | 50 | white="[p=3, est:3d, 1.5:p2, ft:webrtc]"; 51 | ASSERT(ScrumBugs.parse(white).points == 3, "Wrong"); 52 | 53 | }//endif 54 | 55 | 56 | })(); 57 | 58 | 59 | -------------------------------------------------------------------------------- /quantum/lib/metrics-graphics/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "metrics-graphics", 3 | "version": "2.10.1", 4 | "description": "A library optimized for concise, principled data graphics and layouts", 5 | "main": "dist/metricsgraphics.js", 6 | "scripts": { 7 | "build": "gulp build:js", 8 | "test": "gulp test", 9 | "test-ci": "./node_modules/testem/testem.js ci testem.json" 10 | }, 11 | "repository": { 12 | "type": "git", 13 | "url": "git://github.com/mozilla/metrics-graphics.git" 14 | }, 15 | "keywords": [ 16 | "metrics-graphics", 17 | "metricsgraphicsjs", 18 | "metricsgraphics", 19 | "metricsgraphics.js", 20 | "d3 charts" 21 | ], 22 | "author": "Mozilla", 23 | "contributors": [ 24 | "Ali Almossawi (http://twitter.com/alialmossawi)", 25 | "Hamilton Ulmer (http://twitter.com/hamiltonulmer)" 26 | ], 27 | "license": "MPL-2.0", 28 | "bugs": { 29 | "url": "https://github.com/mozilla/metrics-graphics/issues" 30 | }, 31 | "engines": { 32 | "node": ">=0.8.0" 33 | }, 34 | "homepage": "http://metricsgraphicsjs.org", 35 | "dependencies": { 36 | "d3": "^4" 37 | }, 38 | "peerDependencies": { 39 | "jquery": ">=1.11.1" 40 | }, 41 | "devDependencies": { 42 | "jquery": ">=1.11.1", 43 | "gulp": "^3.8.10", 44 | "gulp-concat": "^2.4.2", 45 | "gulp-connect": "^2.2.0", 46 | "gulp-es6-module-transpiler": "^0.2.0", 47 | "gulp-jshint": "^1.9.0", 48 | "gulp-rename": "^1.2.0", 49 | "gulp-rimraf": "^0.1.1", 50 | "gulp-testem": "0.0.1", 51 | "gulp-uglify": "^1.0.2", 52 | "gulp-umd": "^0.1.3", 53 | "gulp-util": "^3.0.1", 54 | "qunitjs": "^1.16.0", 55 | "require-dir": "^0.1.0", 56 | "testem": "^0.6.24" 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /quantum/lib/ccc/pvc/data/translation/BoxplotChartTranslationOper.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * @name pvc.data.BoxplotChartTranslationOper 4 | * 5 | * @class The translation mixin operation of the box plot chart. 6 | * 7 | *8 | * The default box plot format is: 9 | *
10 | *11 | * +----------+----------+--------------+--------------+------------+-------------+ 12 | * | 0 | 1 | 2 | 3 | 4 | 5 | 13 | * +----------+----------+--------------+--------------+------------+-------------+ 14 | * | category | median | lowerQuartil | upperQuartil | minimum | maximum | 15 | * +----------+----------+--------------+--------------+------------+-------------+ 16 | * | any | number | number | number | number | number | 17 | * +----------+----------+--------------+--------------+------------+-------------+ 18 | *19 | * 20 | * @extends pvc.data.MatrixTranslationOper 21 | */ 22 | def.type('pvc.data.BoxplotChartTranslationOper') 23 | .add(/** @lends pvc.data.BoxplotChartTranslationOper# */{ 24 | /** 25 | * @override 26 | */ 27 | _configureTypeCore: function(){ 28 | var autoDimNames = []; 29 | 30 | var V = this.virtualItemSize(); 31 | var C = V - this.M; 32 | 33 | this._getUnboundRoleDefaultDimNames('category', C, autoDimNames); 34 | 35 | pvc.BoxplotChart.measureRolesNames.forEach(function(roleName){ 36 | this._getUnboundRoleDefaultDimNames(roleName, 1, autoDimNames); 37 | }, this); 38 | 39 | autoDimNames.slice(0, this.freeVirtualItemSize()); 40 | if(autoDimNames.length){ 41 | this.defReader({names: autoDimNames}); 42 | } 43 | } 44 | }); -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | charts 2 | ====== 3 | Static pages for [charts.mozilla.org](http://charts.mozilla.org/) The summary 4 | of the this project is found on [the Mozilla wiki](https://wiki.mozilla.org/Auto-tools/Projects/Charts#Overview_of_charts.mozilla.org) 5 | 6 | 7 | Prerequisits 8 | ------------ 9 | 10 | You should be able to reach the public cluster. My people page has [a test page to confirm public cluster is accessible](http://people.mozilla.org/~klahnakoski/modevmetrics/Tutorial01-Minimum.html). 11 | 12 | 13 | Setup 14 | ----- 15 | 16 | Simply clone from Github. 17 | 18 | https://github.com/klahnakoski/MoDevMetrics.git 19 | 20 | You can then open the files with your browser 21 | 22 | 23 | Contribution 24 | ------------ 25 | 26 | There are three main branches 27 | 28 | * [master](https://github.com/mozilla/charts/tree/master) - deployed to production: charts.mozilla.org 29 | * [allizom](https://github.com/mozilla/charts/tree/allizom) - deployed to staging: charts.paas.allizom.org 30 | * [dev](https://github.com/mozilla/charts/tree/dev) - active development: **add you pull requests here** 31 | 32 | Other branches may exist which are working on new dashboards for other teams in the company. 33 | 34 | ###Submitting a Patch 35 | At a bare minimum: 36 | 37 | * fork this repo 38 | * craft your changes, and 39 | * send a pull request 40 | 41 | Extra appreciation is granted if you also 42 | 43 | * update the corresponding bugzilla bug with an attachment pointing to the 44 | pull request 45 | 46 | Using Github pull requests for code submission, and Bugzilla for issue 47 | tracking, is clunky: So stick to the Github if you find this is a nasty 48 | barrier to getting stuff done. What's most important is you submit code! 49 | I will deal with the administration. 50 | 51 | -------------------------------------------------------------------------------- /quantum/modevlib/collections/aRelation.js: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 | 5 | 6 | 7 | //GOOD FOR MANY-MANY RELATIONS 8 | var Relation=function(){ 9 | this.map={}; 10 | }; 11 | 12 | Relation.prototype.add=function(from, to){ 13 | if (!this.map[from]) this.map[from]={}; 14 | this.map[from][to]=1; 15 | return this; 16 | }; 17 | 18 | 19 | //RETURN TRUE IF THIS RELATION IS NET-NEW 20 | Relation.prototype.testAndAdd=function(from, to){ 21 | var isNew=true; 22 | var f=this.map[from]; 23 | if (!f){ 24 | this.map[from]=Map.newInstance(to, 1); 25 | }else if (f[to]){ 26 | isNew=false; 27 | }else{ 28 | f[to]=1; 29 | }//endif 30 | return isNew; 31 | }; 32 | 33 | Relation.prototype.domain = function(){ 34 | return Object.keys(this.map); 35 | }; 36 | 37 | Relation.prototype.addArray=function(from, toArray){ 38 | var f=this.map[from]; 39 | if (!f){ 40 | f={}; 41 | this.map[from]=f; 42 | }//endif 43 | 44 | for(var i=toArray.length;i--;){ 45 | var c=toArray[i]; 46 | if (c===undefined || c==null || c=="") continue; 47 | f[c]=1; 48 | }//for 49 | return this; 50 | }; 51 | 52 | //RETURN AN ARRAY OF OBJECTS THAT from MAPS TO 53 | Relation.prototype.get=function(from){ 54 | var o=this.map[from]; 55 | if (!o) return []; 56 | return Object.keys(o); 57 | }; 58 | 59 | //RETURN AN ARRAY OF OBJECTS THAT from MAPS TO 60 | Relation.prototype.getMap=function(from){ 61 | return this.map[from]; 62 | }; 63 | 64 | Relation.prototype.forall=function(func){ 65 | var keys=Object.keys(this.map); 66 | for(var i=0;i
d3.json('data/fake_users3.json', function(data) {
7 | for(var i = 0; i < data.length; i++) {
8 | data[i] = MG.convert.date(data[i], 'date');
9 | }
10 |
11 | MG.data_graphic({
12 | title: "Preserving the aspect ratio",
13 | description: "You can automatically set the width or height of a data graphic to fit its parent element. When done the graphic will rescale to fit the size of the parent element while preserving its aspect ratio.",
14 | data: data,
15 | full_width: true,
16 | height: 300,
17 | right: 40,
18 | x_extended_ticks: true,
19 | target: '#aspect1',
20 | x_accessor: 'date',
21 | y_accessor: 'value'
22 | });
23 | });
24 |
25 | 25 | 26 |<script src='js/addons/mg_line_brushing.js'></script> 7 | <link rel='stylesheet' href='css/addons/mg_line_brushing.css' />8 |d3.json('data/fake_users2.json', function(data) { 9 | for (var i = 0; i < data.length; i++) { 10 | data[i] = MG.convert.date(data[i], 'date'); 11 | } 12 | 13 | MG.data_graphic({ 14 | title: "Brushing Addon by Dan De Havilland", 15 | description: "Drag the crosshair over the chart to zoom. For further details about this addon, take a look at its GitHub repo.", 16 | data: data, 17 | top: 70, 18 | width: 600, 19 | height: 240, 20 | right: 40, 21 | missing_is_hidden: true, 22 | target: '#brushing' 23 | }); 24 | });
9 | * To create an atom, 10 | * call the corresponding dimension's 11 | * {@link pvc.data.Dimension#intern} method. 12 | * 13 | * Usually this is done by a {@link pvc.data.TranslationOper}. 14 | *
15 | * 16 | * @property {pvc.data.Dimension} dimension The owner dimension. 17 | * 18 | * @property {number} id 19 | * A unique object identifier. 20 | * 21 | * @property {any} rawValue The raw value from which {@link #value} is derived. 22 | *23 | * It is not always defined. 24 | * Values may be the result of 25 | * combining multiple source values. 26 | * 27 | * Values may even be constant 28 | * and, as such, 29 | * not be derived from 30 | * any of the source values. 31 | *
32 | * 33 | * @property {any} value The typed value of the atom. 34 | * It must be consistent with the corresponding {@link pvc.data.DimensionType#valueType}. 35 | * 36 | * @property {string} label The formatted value. 37 | *38 | * Only the null atom can have a empty label. 39 | *
40 | * 41 | * @property {string} key The value of the atom expressed as a 42 | * string in a way that is unique amongst all atoms of its dimension. 43 | *44 | * Only the null atom has a key equal to "". 45 | *
46 | * @property {string} globalKey A semantic key that is unique across atoms of every dimensions. 47 | * 48 | * @constructor 49 | * @private 50 | * @param {pvc.data.Dimension} dimension The dimension that the atom belongs to. 51 | * @param {any} value The typed value. 52 | * @param {string} label The formatted value. 53 | * @param {any} rawValue The source value. 54 | * @param {string} key The key. 55 | */ 56 | def.type('pvc.data.Atom') 57 | .init( 58 | function(dimension, value, label, rawValue, key) { 59 | this.dimension = dimension; 60 | this.id = (value == null ? -def.nextId() : def.nextId()); // Ensure null sorts first, when sorted by id 61 | this.value = value; 62 | this.label = label; 63 | if(rawValue !== undefined){ 64 | this.rawValue = rawValue; 65 | } 66 | this.key = key; 67 | }) 68 | .add( /** @lends pvc.data.Atom */{ 69 | isVirtual: false, 70 | 71 | rawValue: undefined, 72 | 73 | /** 74 | * Obtains the label of the atom. 75 | */ 76 | toString: function(){ 77 | var label = this.label; 78 | if(label != null){ 79 | return label; 80 | } 81 | 82 | label = this.value; 83 | return label != null ? ("" + label) : ""; 84 | } 85 | }); 86 | 87 | 88 | /** 89 | * Comparer for atom according to their id. 90 | */ 91 | function atom_idComparer(a, b) { 92 | return a.id - b.id; // works for numbers... 93 | } 94 | 95 | /** 96 | * Reverse comparer for atom according to their id. 97 | */ 98 | function atom_idComparerReverse(a, b) { 99 | return b.id - a.id; // works for numbers... 100 | } -------------------------------------------------------------------------------- /quantum/modevlib/gui/accordion.js: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // This Source Code Form is subject to the terms of the Mozilla Public 3 | // License, v. 2.0. If a copy of the MPL was not distributed with this 4 | // file, You can obtain one at http://mozilla.org/MPL/2.0/. 5 | //////////////////////////////////////////////////////////////////////////////// 6 | // Author: Kyle Lahnakoski (kyle@lahnakoski.com) 7 | //////////////////////////////////////////////////////////////////////////////// 8 | 9 | importScript("../../lib/jquery.js"); 10 | 11 | /////////////////////////////////////////////////////////////////////////////// 12 | // DROP-DOWN ACCORDIONS 13 | // 14 | // MARKUP DOM ELEMENTS WITH class="accordion_header" TO USE THIS LIBRARY 15 | // 16 | // class="accordion_header_open" - WHEN BODY IS OPEN 17 | // class="accordion_header_closed" - WHEN BODY IS CLOSED (ASSIGNED IMMEDIATELY) 18 | // accordion_id - POINTS TO THE ID OF ELEMENT TO EXPAND/CONTRACT 19 | // accordion_group - ONLY ONE MEMBER OF THE GROUP CAN STAY OPEN 20 | // 21 | // jquery is extended with updateAccordion() TO RESIZE THE BODY 22 | // 23 | /////////////////////////////////////////////////////////////////////////////// 24 | 25 | 26 | $(document).ready(function () { 27 | function close(e) { 28 | return e.animate({"height": 0}, 500); 29 | } 30 | 31 | function open(e) { 32 | var height=0; 33 | e.children().each(function(){ 34 | var oh=$(this).outerHeight(); 35 | height+=oh; 36 | }); 37 | e.css({"display":"block"}); 38 | e.animate({"height": height+"px"}, 500); 39 | } 40 | 41 | //MAKE SURE OPEN DIV RESIZE TO FULL 42 | $.fn.updateAccordion = function update(){ 43 | var self=$(this); 44 | $(".accordion_header_open[accordion_id='" + self.attr("id") + "']").each(function(){ 45 | open(self); 46 | }); 47 | return this; 48 | }; 49 | 50 | $(".accordion_header, .accordion_header_open, .accordion_header_closed") 51 | .click(function (e) { 52 | var self = $(this); 53 | var group=self.attr("accordion_group"); 54 | //CLOSE THE OTHERS 55 | $(".accordion_header_open[accordion_group='" + group + "']").each(function () { 56 | var other=$(this); 57 | if (self.get(0) !== other.get(0)) { 58 | other.addClass("accordion_header_closed").removeClass("accordion_header_open"); 59 | close($("#" + other.attr("accordion_id"))); 60 | }//endif 61 | }); 62 | //TOGGLE THIS' STATE 63 | if (["accordion_header_open"].contains(self.attr("class"))) { 64 | self.addClass("accordion_header_closed").removeClass("accordion_header_open"); 65 | close($("#" + self.attr("accordion_id"))); 66 | } else { 67 | self.addClass("accordion_header_open").removeClass("accordion_header_closed"); 68 | open($("#" + self.attr("accordion_id"))); 69 | }//endif 70 | }) 71 | .each(function () { 72 | var self = $(this); 73 | var body = $("#" + self.attr("accordion_id")); 74 | body.addClass("accordion_body"); 75 | 76 | if (self.attr("class") == "accordion_header") { 77 | //DEFAULT IS CLOSED 78 | self.addClass("accordion_header_closed"); 79 | self.removeClass("accordion_header"); 80 | body.css({"display":"none"}); 81 | close(body); 82 | }else if (self.attr("class") == "accordion_header_closed") { 83 | body.css({"display":"none"}); 84 | close(body); 85 | }//endif 86 | }); 87 | }); 88 | 89 | -------------------------------------------------------------------------------- /quantum/lib/metrics-graphics/tests/charts/bar_test.js: -------------------------------------------------------------------------------- 1 | var target = '#qunit-fixture', 2 | defaults; 3 | 4 | module('bar', { 5 | setup: function() { 6 | defaults = { 7 | target: target, 8 | chart_type: 'bar', 9 | x_accessor: 'value', 10 | y_accessor: 'label', 11 | transition_on_update: false, 12 | data: [{ 13 | label: 'Bar 1', 14 | value: 100 15 | },{ 16 | label: 'Bar 2', 17 | value: 200 18 | },{ 19 | label: 'Bar 3', 20 | value: 300 21 | }] 22 | }; 23 | } 24 | }); 25 | 26 | test('Correct number of bars are added', function() { 27 | expect(1); 28 | MG.data_graphic(defaults); 29 | equal(document.querySelectorAll('.mg-bar').length, 3, 'Should have 3 bars'); 30 | }); 31 | 32 | test('Triggers callbacks when provided', function() { 33 | var mouseoverCalled = false, 34 | mousemoveCalled = false, 35 | mouseoutCalled = false, 36 | 37 | params = extend(defaults, { 38 | mouseover: function() { 39 | mouseoverCalled = true; 40 | }, 41 | mousemove: function() { 42 | mousemoveCalled = true; 43 | }, 44 | mouseout: function() { 45 | mouseoutCalled = true; 46 | } 47 | }); 48 | 49 | MG.data_graphic(params); 50 | 51 | var bar = document.getElementsByClassName('mg-bar-rollover')[0]; 52 | 53 | bar.dispatchEvent(generateMouseEvent('mouseover')); 54 | equal(mouseoverCalled, true, 'mouseover was called'); 55 | 56 | bar.dispatchEvent(generateMouseEvent('mousemove')); 57 | equal(mousemoveCalled, true, 'mousemove was called'); 58 | 59 | bar.dispatchEvent(generateMouseEvent('mouseout')); 60 | equal(mouseoutCalled, true, 'mouseout was called'); 61 | }); 62 | 63 | // test('When updating', function() { 64 | // var bars = [{ 65 | // label: 'Bar 1', 66 | // value: 100, 67 | // predictor: 75, 68 | // baseline: 50 69 | // }]; 70 | 71 | // var params = extend(defaults, { 72 | // data: bars, 73 | // height: 100, 74 | // width: 300, 75 | // orientation: 'vertical', 76 | // predictor_accessor: 'predictor', 77 | // baseline_accessor: 'baseline', 78 | // animate_on_load: false, 79 | // transition_on_update: false 80 | // }); 81 | 82 | // MG.data_graphic(params); 83 | // equal(164, d3.select(target).select('.mg-barplot .mg-bar').attr('width'), 'initial bar size is correct'); 84 | // equal(123, d3.select(target).select('.mg-barplot .mg-bar-prediction').attr('width'), 'initial predictor size is correct'); 85 | // equal(160, d3.select(target).select('.mg-barplot .mg-bar-baseline').attr('x1'), 'initial baseline position is correct'); 86 | 87 | // params.data[0][0].value = 50; 88 | // params.data[0][0].predictor = 100; 89 | // params.data[0][0].baseline = 75; 90 | 91 | // MG.data_graphic(params); 92 | // equal(82, d3.select(target).select('.mg-barplot .mg-bar').attr('width'), 'the bars are redrawn with correct sizes'); 93 | // equal(164, d3.select(target).select('.mg-barplot .mg-bar-prediction').attr('width'), 'the predictors are redrawn with correct sizes'); 94 | // equal(201, d3.select(target).select('.mg-barplot .mg-bar-baseline').attr('x1'), 'the baseline is redrawn in the correct position'); 95 | // }); 96 | -------------------------------------------------------------------------------- /quantum/lib/ccc/pvc/pvcBarChart.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * BarChart is the main class for generating... bar charts (another surprise!). 4 | */ 5 | def 6 | .type('pvc.BarChart', pvc.BarAbstract) 7 | .add({ 8 | 9 | _allowV1SecondAxis: true, 10 | 11 | _initPlotsCore: function(hasMultiRole){ 12 | var options = this.options; 13 | 14 | var barPlot = new pvc.visual.BarPlot(this); 15 | var trend = barPlot.option('Trend'); 16 | 17 | if(options.plot2){ 18 | // Line Plot 19 | var plot2Plot = new pvc.visual.PointPlot(this, { 20 | name: 'plot2', 21 | fixed: { 22 | DataPart: '1' 23 | }, 24 | defaults: { 25 | ColorAxis: 2, 26 | LinesVisible: true, 27 | DotsVisible: true 28 | }}); 29 | 30 | if(!trend){ 31 | trend = plot2Plot.option('Trend'); 32 | } 33 | } 34 | 35 | if(trend){ 36 | // Trend Plot 37 | new pvc.visual.PointPlot(this, { 38 | name: 'trend', 39 | fixed: { 40 | DataPart: 'trend', 41 | TrendType: 'none', 42 | ColorRole: 'series', // one trend per series 43 | NullInterpolatioMode: 'none' 44 | }, 45 | defaults: { 46 | ColorAxis: 2, 47 | LinesVisible: true, 48 | DotsVisible: false 49 | } 50 | }); 51 | } 52 | }, 53 | 54 | _hasDataPartRole: function(){ 55 | return true; 56 | }, 57 | 58 | /** 59 | * @override 60 | */ 61 | _createPlotPanels: function(parentPanel, baseOptions){ 62 | var plots = this.plots; 63 | 64 | var barPlot = plots.bar; 65 | var barPanel = new pvc.BarPanel( 66 | this, 67 | parentPanel, 68 | barPlot, 69 | Object.create(baseOptions)); 70 | 71 | // legacy field 72 | this.barChartPanel = barPanel; 73 | 74 | var plot2Plot = plots.plot2; 75 | if(plot2Plot){ 76 | if(pvc.debug >= 3){ 77 | this._log("Creating Point panel."); 78 | } 79 | 80 | var pointPanel = new pvc.PointPanel( 81 | this, 82 | parentPanel, 83 | plot2Plot, 84 | Object.create(baseOptions)); 85 | 86 | // Legacy fields 87 | barPanel.pvSecondLine = pointPanel.pvLine; 88 | barPanel.pvSecondDot = pointPanel.pvDot; 89 | 90 | pointPanel._applyV1BarSecondExtensions = true; 91 | } 92 | 93 | var trendPlot = plots.trend; 94 | if(trendPlot){ 95 | if(pvc.debug >= 3){ 96 | this._log("Creating Trends Point panel."); 97 | } 98 | 99 | new pvc.PointPanel( 100 | this, 101 | parentPanel, 102 | trendPlot, 103 | Object.create(baseOptions)); 104 | } 105 | } 106 | }); 107 | -------------------------------------------------------------------------------- /quantum/lib/metrics-graphics/tests/charts/missing_test.js: -------------------------------------------------------------------------------- 1 | module('missing'); 2 | 3 | test('Missing chart\'s text matches specified missing_text', function() { 4 | var params = { 5 | target: '#qunit-fixture', 6 | chart_type: 'missing-data', 7 | missing_text: 'In an astral plane that was never meant to fly...' 8 | }; 9 | 10 | MG.data_graphic(params); 11 | equal(document.querySelector('.mg-missing-text').textContent, 12 | params.missing_text, 13 | 'Missing chart\'s text matches missing_text'); 14 | }); 15 | 16 | test('Only one mg-missing-pane on multiple calls to the same target element', function() { 17 | var params = { 18 | target: '#qunit-fixture', 19 | chart_type: 'missing-data', 20 | missing_text: 'In an astral plane that was never meant to fly...' 21 | }; 22 | 23 | MG.data_graphic(params); 24 | MG.data_graphic(MG.clone(params)); 25 | 26 | equal(document.querySelectorAll(params.target + ' .mg-missing-pane').length, 1, 'We only have one mg-missing-pane'); 27 | }); 28 | 29 | test('Only one mg-missing-text on multiple calls to the same target element', function() { 30 | var params = { 31 | target: '#qunit-fixture', 32 | chart_type: 'missing-data', 33 | missing_text: 'In an astral plane that was never meant to fly...' 34 | }; 35 | 36 | MG.data_graphic(params); 37 | MG.data_graphic(MG.clone(params)); 38 | 39 | equal(document.querySelectorAll(params.target + ' .mg-missing-text').length, 1, 'We only have one mg-missing-text'); 40 | }); 41 | 42 | test('missing chart obeys full_width: true', function() { 43 | var params = { 44 | target: '#qunit-fixture', 45 | chart_type: 'missing-data', 46 | full_width: true, 47 | missing_text: 'In an astral plane that was never meant to fly...' 48 | }; 49 | document.querySelector('#qunit-fixture').style.width='700px'; 50 | 51 | MG.data_graphic(params); 52 | 53 | equal(document.querySelector('#qunit-fixture svg').getAttribute('width'), 700, 'The missing chart svg has same width as parent element.'); 54 | }); 55 | 56 | test('missing chart obeys full_height: true', function() { 57 | var params = { 58 | target: '#qunit-fixture', 59 | chart_type: 'missing-data', 60 | full_height: true, 61 | missing_text: 'In an astral plane that was never meant to fly...' 62 | }; 63 | document.querySelector('#qunit-fixture').style.height='700px'; 64 | 65 | MG.data_graphic(params); 66 | 67 | equal(document.querySelector('#qunit-fixture svg').getAttribute('height'), 700, 'The missing chart svg has same width as parent element.'); 68 | }); 69 | 70 | test('Missing chart\'s width is set correctly on subsequent calls to existing chart', function() { 71 | var params_0 = { 72 | target: '#qunit-fixture', 73 | chart_type: 'missing-data', 74 | missing_text: 'In an astral plane that was never meant to fly...' 75 | }; 76 | 77 | var params = { 78 | target: '#qunit-fixture', 79 | chart_type: 'missing-data', 80 | missing_text: 'In an astral plane that was never meant to fly...', 81 | width: 200, 82 | height: 100, 83 | }; 84 | 85 | MG.data_graphic(params_0); 86 | MG.data_graphic(params); 87 | 88 | var width = document.querySelector(params.target + ' svg').clientWidth; 89 | ok(width == 200, 'SVG\'s width matches latest specified width'); 90 | }); 91 | -------------------------------------------------------------------------------- /quantum/lib/ccc/data/dt.js: -------------------------------------------------------------------------------- 1 | 2 | var datTreeTestStructure_01 = { 3 | "resultset": [ 4 | ["A1", "Profit", "winst", "sum", "B1 B2"], 5 | ["B1", "Contribution-margin", "bijdrage", "sum", ""], 6 | ["B2 ", "Cost", "kosten", "sum", ""] 7 | ], 8 | "metadata": [{ 9 | "colIndex": 0, 10 | "colType": "String", 11 | "colName": "box_id" 12 | }, { 13 | "colIndex": 1, 14 | "colType": "String", 15 | "colName": "label" 16 | }, { 17 | "colIndex": 2, 18 | "colType": "String", 19 | "colName": "selector" 20 | }, { 21 | "colIndex": 3, 22 | "colType": "String", 23 | "colName": "aggregation" 24 | }, { 25 | "colIndex": 4, 26 | "colType": "String", 27 | "colName": "children" 28 | } 29 | ] 30 | }; 31 | 32 | var datTreeTestData_01 = { 33 | "resultset": [ 34 | ["winst", "_p5", 10], 35 | ["winst", "_p25", 30], 36 | ["winst", "_p50", 35], 37 | ["winst", "_p75", 40], 38 | ["winst", "_p95", 50], 39 | ["winst", "team A", 45], 40 | ["winst", "team B", 17], 41 | 42 | ["bijdrage", "_p5", 10], 43 | ["bijdrage", "_p25", 30], 44 | ["bijdrage", "_p50", 60], 45 | ["bijdrage", "_p75", 80], 46 | ["bijdrage", "_p95", 95], 47 | ["bijdrage", "team A", 55], 48 | ["bijdrage", "team B", 77], 49 | 50 | ["kosten", "_p5", 3], 51 | ["kosten", "_p25", 20], 52 | ["kosten", "_p50", 50], 53 | ["kosten", "_p75", 60], 54 | ["kosten", "_p95", 80], 55 | ["kosten", "team A", 10], 56 | ["kosten", "team B", 60] 57 | ], 58 | "metadata": [{ 59 | "colIndex": 0, 60 | "colType": "String", 61 | "colName": "selector" 62 | }, { 63 | "colIndex": 1, 64 | "colType": "String", 65 | "colName": "category" 66 | }, { 67 | "colIndex": 2, 68 | "colType": "Numeric", 69 | "colName": "value" 70 | } 71 | ] 72 | }; 73 | 74 | var datTreeTestStructure_02 = { 75 | "resultset": [ 76 | ["A1", "Winst", "winst", "sum", "B1 B2", 100, 70], 77 | ["B1", "Bijdrage", "bijdrage", "sum", "", 300, 100], 78 | ["B2 ", "Kosten", "kosten", "sum", "", 20, 200] 79 | ], 80 | "metadata": [{ 81 | "colIndex": 0, 82 | "colType": "String", 83 | "colName": "box_id" 84 | }, { 85 | "colIndex": 1, 86 | "colType": "String", 87 | "colName": "label" 88 | }, { 89 | "colIndex": 2, 90 | "colType": "String", 91 | "colName": "selector" 92 | }, { 93 | "colIndex": 3, 94 | "colType": "String", 95 | "colName": "aggregation" 96 | }, { 97 | "colIndex": 4, 98 | "colType": "String", 99 | "colName": "children" 100 | }, { 101 | "colIndex": 5, 102 | "colType": "Integer", 103 | "colName": "bottom" 104 | }, { 105 | "colIndex": 6, 106 | "colType": "Integer", 107 | "colName": "height" 108 | } 109 | ] 110 | }; 111 | 112 | -------------------------------------------------------------------------------- /quantum/lib/metrics-graphics/examples/css/highlightjs-default.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Original style from softwaremaniacs.org (c) Ivan Sagalaev8 | * The default format is: 9 | *
10 | *11 | * +----------+----------+----------+----------+----------+ 12 | * | 0 | 1 | 2 | 3 | 4 | 13 | * +----------+----------+----------+----------+----------+ 14 | * | series | x | y | color | size | 15 | * +----------+----------+----------+----------+----------+ 16 | * | discrete | number | number | num/disc | number | 17 | * +----------+----------+----------+----------+----------+ 18 | *19 | * 20 | *
21 | * Color dimensions will be continuous by default. 22 | * If that is not the case, 23 | * an explicit dimension valueType definition must be provided. 24 | *
25 | * 26 | * @extends pvc.data.MatrixTranslationOper 27 | */ 28 | def.type('pvc.data.MetricPointChartTranslationOper') 29 | .add(/** @lends pvc.data.MetricPointChartTranslationOper# */{ 30 | 31 | _meaLayoutRoles: ['x', 'y', 'color', 'size'], 32 | 33 | configureType: function(){ 34 | var itemTypes = this._itemTypes; 35 | 36 | var V = itemTypes.length; 37 | 38 | // VItem Indexes of continuous columns not yet being read 39 | var freeMeaIndexes = []; 40 | 41 | // Idem, but for discrete columns 42 | var freeDisIndexes = []; 43 | 44 | def 45 | .range(0, V) 46 | .each(function(j){ 47 | if(!this._userUsedIndexes[j]){ 48 | if(itemTypes[j] === 1){ 49 | freeMeaIndexes.push(j); 50 | } else { 51 | freeDisIndexes.push(j); 52 | } 53 | } 54 | }, this); 55 | 56 | // Distribute free measure columns by unbound measure roles 57 | var N; 58 | var autoDimNames = []; 59 | var F = freeMeaIndexes.length; 60 | if(F > 0){ 61 | // Collect the default dimension names of the 62 | // first F unbound roles 63 | var R = this._meaLayoutRoles.length; 64 | var i = 0; 65 | while(i < R && autoDimNames.length < F){ 66 | // If the measure role is unbound and has a default dimension, 67 | // the next unused dimension of the default dimension group name 68 | // is placed in autoDimNames. 69 | // If any, this dimension will be fed with the next freeMeaIndexes 70 | this._getUnboundRoleDefaultDimNames(this._meaLayoutRoles[i], 1, autoDimNames); 71 | i++; 72 | } 73 | 74 | N = autoDimNames.length; 75 | if(N > 0){ 76 | freeMeaIndexes.length = N; 77 | this.defReader({names: autoDimNames, indexes: freeMeaIndexes}); 78 | } 79 | } 80 | 81 | // All discrete columns go to series dimensions 82 | F = freeDisIndexes.length; 83 | if(F > 0){ 84 | autoDimNames.length = 0; 85 | this._getUnboundRoleDefaultDimNames('series', F, autoDimNames); 86 | 87 | N = autoDimNames.length; 88 | if(N > 0){ 89 | freeDisIndexes.length = N; 90 | this.defReader({names: autoDimNames, indexes: freeDisIndexes}); 91 | } 92 | } 93 | } 94 | }); --------------------------------------------------------------------------------