Updated docs with rescue campaign

This commit is contained in:
Gion Kunz 2019-05-24 01:06:37 +02:00
parent 9d4d6d5491
commit bb3caadc8f
616 changed files with 48269 additions and 90828 deletions

File diff suppressed because one or more lines are too long

View File

@ -22,7 +22,7 @@
"tag": "0.3.0",
"commit": "772df096a5ffe983f40202684ad45eed1e0e2d59"
},
"_source": "git://github.com/davidchambers/Base64.js.git",
"_source": "https://github.com/davidchambers/Base64.js.git",
"_target": "~0.3.0",
"_originalSource": "base64"
}

View File

@ -23,7 +23,7 @@
"tag": "v0.0.4",
"commit": "4fff97574a1b1a5bc0f387984d024b75f450fe54"
},
"_source": "git://github.com/gionkunz/chartist-plugin-accessibility.git",
"_source": "https://github.com/gionkunz/chartist-plugin-accessibility.git",
"_target": "~0.0.2",
"_originalSource": "chartist-plugin-accessibility"
}

View File

@ -1,29 +1,14 @@
{
"name": "chartist-plugin-axistitle",
"version": "0.0.1",
"main": [
"./dist/chartist-plugin-axistitle.min.js"
],
"dependencies": {
"chartist": "~0.9.0"
},
"ignore": [
".*",
"Gruntfile.js",
"package.json",
"node_modules",
"src",
"test",
"tasks"
],
"homepage": "https://github.com/alexstanbury/chartist-plugin-axistitle",
"_release": "0.0.1",
"version": "0.0.6",
"_release": "0.0.6",
"_resolution": {
"type": "version",
"tag": "0.0.1",
"commit": "d5bde3a9a6a7205388c23bef254258986a7b77bd"
"tag": "0.0.6",
"commit": "f37a8e9f083477e83b68e1481269123b86019006"
},
"_source": "git://github.com/alexstanbury/chartist-plugin-axistitle.git",
"_source": "https://github.com/alexstanbury/chartist-plugin-axistitle.git",
"_target": "~0.0.1",
"_originalSource": "chartist-plugin-axistitle"
}

View File

@ -0,0 +1,25 @@
/**
* Grunt Configurations
* ====================
*
* Seperate tasks and configurations are declared in '/tasks'.
*
* Link: https://github.com/firstandthird/load-grunt-config
*/
'use strict';
module.exports = function (grunt) {
// tracks how long a tasks take
require('time-grunt')(grunt);
// load task and configurations
require('load-grunt-config')(grunt, {
configPath: __dirname + '/tasks',
data: {
pkg: grunt.file.readJSON('package.json'),
year: new Date().getFullYear()
}
});
};

View File

@ -1,13 +1,21 @@
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
The MIT License (MIT)
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
Copyright (c) 2004 Sam Hocevar <sam@hocevar.net>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
0. You just DO WHAT THE FUCK YOU WANT TO.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1,72 +1,97 @@
# Axis title plugin for Chartist.js
This plugin allows the creation and placement of axis titles. The plugin will throw an error if it is applied to a chart
that contains no axes, such as a Pie chart.
This plugin allows the creation and placement of axis titles. The plugin will throw an error if it is applied to a chart that contains no axes, such as a Pie chart.
In order to use it, you will need to include the excellent charting library Chartist.js in your page.
http://gionkunz.github.io/chartist-js/index.html
## Installation
Install using npm:
`npm install chartist-plugin-axistitle`
## Available options and their defaults
```javascript
var defaultOptions = {
// The title to be displayed on the axis. If at least one axis title is not supplied then an error is thrown.
axisTitle: '',
// One or more class names to be added to the axis title. Multiple class names should be separated by a space.
axisClass: 'ct-axis-title',
// This can also be passed a function to enable simple updating of the title if your chart data changes.
axisTitle: "",
// One or more class names to be added to the axis title.
// Multiple class names should be separated by a space.
// This can also be passed a function to enable simple updating of the classes if your chart data changes.
axisClass: "ct-axis-title",
// How much to offset the title by.
offset: {x:0, y:0},
// Please note, x and y offset values for axisY are flipped due to the rotation of the axisY title by 90 degrees.
// Therefore changing the x value moves up/down the chart, while changing y moves left/right.
offset: { x: 0, y: 0 },
// Defines the anchoring of the title text. Possible values are 'start', 'end' and 'middle'.
textAnchor: 'middle',
textAnchor: "middle",
// Whether to flip the direction of the text. Note - This can only be used on axis Y.
flipText : false
flipTitle: false
};
```
## Sample usage
```javascript
var chart = new Chartist.Line('.ct-chart', {
labels: ['0-15', '16-30', '31-45', '46-60', '61-75', '76-90', '91-105', '106-120'],
series: [1, 3, 7, 12, 1, 2, 1, 0]
}, {
chartPadding: {
top: 20,
right: 0,
bottom: 20,
left: 0
},
axisY: {
onlyInteger: true
},
plugins: [
Chartist.plugins.ctAxisTitle({
axisX: {
axisTitle: 'Time (mins)',
axisClass: 'ct-axis-title',
offset: {
x: 0,
y: 50
},
textAnchor: 'middle'
},
axisY: {
axisTitle: 'Goals',
axisClass: 'ct-axis-title',
offset: {
x: 0,
y: 0
},
flipTitle: false
}
})
]
});
```
var chart = new Chartist.Line(
".ct-chart",
{
labels: [
"0-15",
"16-30",
"31-45",
"46-60",
"61-75",
"76-90",
"91-105",
"106-120"
],
series: [[1, 3, 7, 12, 1, 2, 1, 0]]
},
{
chartPadding: {
top: 20,
right: 0,
bottom: 20,
left: 0
},
axisY: {
onlyInteger: true
},
plugins: [
Chartist.plugins.ctAxisTitle({
axisX: {
axisTitle: "Time (mins)",
axisClass: "ct-axis-title",
offset: {
x: 0,
y: 50
},
textAnchor: "middle"
},
axisY: {
axisTitle: "Goals",
axisClass: "ct-axis-title",
offset: {
x: 0,
y: -1
},
flipTitle: false
}
})
]
}
);
```
## Example
Install using `npm install` then run/edit the example.html file to see the plugin in action

View File

@ -1,19 +0,0 @@
{
"name": "chartist-plugin-axistitle",
"version": "0.0.1",
"main": [
"./dist/chartist-plugin-axistitle.min.js"
],
"dependencies": {
"chartist": "~0.9.0"
},
"ignore": [
".*",
"Gruntfile.js",
"package.json",
"node_modules",
"src",
"test",
"tasks"
]
}

View File

@ -1,13 +1,21 @@
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
The MIT License (MIT)
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
Copyright (c) 2004 Sam Hocevar <sam@hocevar.net>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
0. You just DO WHAT THE FUCK YOU WANT TO.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1,115 +1,145 @@
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
(function(root, factory) {
if (typeof define === "function" && define.amd) {
// AMD. Register as an anonymous module.
define([], function () {
return (root.returnExportsGlobal = factory());
define(["chartist"], function(Chartist) {
return (root.returnExportsGlobal = factory(Chartist));
});
} else if (typeof exports === 'object') {
} else if (typeof exports === "object") {
// Node. Does not work with strict CommonJS, but
// only CommonJS-like enviroments that support module.exports,
// like Node.
module.exports = factory();
module.exports = factory(require("chartist"));
} else {
root['Chartist.plugins.ctAxisTitle'] = factory();
root["Chartist.plugins.ctAxisTitle"] = factory(Chartist);
}
}(this, function () {
})(this, function(Chartist) {
/**
* Chartist.js plugin to display a title for 1 or 2 axises.
*
* Chartist.js plugin to display a title for 1 or 2 axes.
* version 0.0.5
* author: alex stanbury
*/
/* global Chartist */
(function (window, document, Chartist) {
'use strict';
(function(window, document, Chartist) {
"use strict";
var axisDefaults = {
axisTitle: '',
axisClass: 'ct-axis-title',
offset: {
x: 0,
y: 0
},
textAnchor: 'middle',
flipText: false
};
var defaultOptions = {
xAxis: axisDefaults,
yAxis: axisDefaults
var axisDefaults = {
axisTitle: "",
axisClass: "ct-axis-title",
offset: {
x: 0,
y: 0
},
textAnchor: "middle",
flipTitle: false
};
var defaultOptions = {
axisX: axisDefaults,
axisY: axisDefaults
};
var getTitle = function(title) {
if (title instanceof Function) {
return title();
}
return title;
};
var getClasses = function(classes) {
if (classes instanceof Function) {
return classes();
}
return classes;
};
Chartist.plugins = Chartist.plugins || {};
Chartist.plugins.ctAxisTitle = function(options) {
options = Chartist.extend({}, defaultOptions, options);
return function ctAxisTitle(chart) {
chart.on("created", function(data) {
if (!options.axisX.axisTitle && !options.axisY.axisTitle) {
throw new Error(
"ctAxisTitle plugin - You must provide at least one axis title"
);
} else if (!data.axisX && !data.axisY) {
throw new Error(
"ctAxisTitle plugin can only be used on charts that have at least one axis"
);
}
var xPos,
yPos,
title,
chartPadding = Chartist.normalizePadding(data.options.chartPadding); // normalize the padding in case the full padding object was not passed into the options
//position axis X title
if (options.axisX.axisTitle && data.axisX) {
xPos =
data.axisX.axisLength / 2 +
data.options.axisY.offset +
chartPadding.left;
yPos = chartPadding.top;
if (data.options.axisY.position === "end") {
xPos -= data.options.axisY.offset;
}
if (data.options.axisX.position === "end") {
yPos += data.axisY.axisLength;
}
title = new Chartist.Svg("text");
title.addClass(getClasses(options.axisX.axisClass));
title.text(getTitle(options.axisX.axisTitle));
title.attr({
x: xPos + options.axisX.offset.x,
y: yPos + options.axisX.offset.y,
"text-anchor": options.axisX.textAnchor
});
data.svg.append(title, true);
}
//position axis Y title
if (options.axisY.axisTitle && data.axisY) {
xPos = 0;
yPos = data.axisY.axisLength / 2 + chartPadding.top;
if (data.options.axisX.position === "start") {
yPos += data.options.axisX.offset;
}
if (data.options.axisY.position === "end") {
xPos = data.axisX.axisLength;
}
var transform =
"rotate(" +
(options.axisY.flipTitle ? -90 : 90) +
", " +
xPos +
", " +
yPos +
")";
title = new Chartist.Svg("text");
title.addClass(getClasses(options.axisY.axisClass));
title.text(getTitle(options.axisY.axisTitle));
title.attr({
x: xPos + options.axisY.offset.x,
y: yPos + options.axisY.offset.y,
transform: transform,
"text-anchor": options.axisY.textAnchor
});
data.svg.append(title, true);
}
});
};
};
})(window, document, Chartist);
Chartist.plugins = Chartist.plugins || {};
Chartist.plugins.ctAxisTitle = function (options) {
options = Chartist.extend({}, defaultOptions, options);
return function ctAxisTitle(chart) {
chart.on('created', function (data) {
if (!options.axisX.axisTitle && !options.axisY.axisTitle) {
throw new Error('ctAxisTitle plugin - You must provide at least one axis title');
} else if (!data.axisX && !data.axisY) {
throw new Error('ctAxisTitle plugin can only be used on charts that have at least one axis');
}
var xPos;
var yPos;
var title;
//position axis X title
if (options.axisX.axisTitle && data.axisX) {
xPos = (data.axisX.axisLength / 2) + data.options.axisX.offset + data.options.chartPadding.left;
yPos = data.options.chartPadding.top;
if (data.options.axisX.position === 'end') {
yPos += data.axisY.axisLength;
}
title = new Chartist.Svg("text");
title.addClass(options.axisX.axisClass);
title.text(options.axisX.axisTitle);
title.attr({
x: xPos + options.axisX.offset.x,
y: yPos + options.axisX.offset.y,
"text-anchor": options.axisX.textAnchor
});
data.svg.append(title, true);
}
//position axis Y title
if (options.axisY.axisTitle && data.axisY) {
xPos = 0;
yPos = (data.axisY.axisLength / 2) + data.options.chartPadding.top;
if (data.options.axisY.position === 'end') {
xPos = data.axisX.axisLength;
}
var transform = 'rotate(' + (options.axisY.flipTitle ? -90 : 90) + ', ' + xPos + ', ' + yPos + ')';
title = new Chartist.Svg("text");
title.addClass(options.axisY.axisClass);
title.text(options.axisY.axisTitle);
title.attr({
x: xPos + options.axisY.offset.x,
y: yPos + options.axisY.offset.y,
transform: transform,
"text-anchor": options.axisY.textAnchor
});
data.svg.append(title, true);
}
});
};
};
}(window, document, Chartist));
return Chartist.plugins.ctAxisTitle;
}));
});

View File

@ -1,8 +1,2 @@
/* chartist-plugin-axistitle 0.0.1
* Copyright © 2015 Alex Stanbury
* Free to use under the WTFPL license.
* http://www.wtfpl.net/
*/
!function(a,b){"function"==typeof define&&define.amd?define([],function(){return a.returnExportsGlobal=b()}):"object"==typeof exports?module.exports=b():a["Chartist.plugins.ctAxisTitle"]=b()}(this,function(){return function(a,b,c){"use strict";var d={axisTitle:"",axisClass:"ct-axis-title",offset:{x:0,y:0},textAnchor:"middle",flipText:!1},e={xAxis:d,yAxis:d};c.plugins=c.plugins||{},c.plugins.ctAxisTitle=function(a){return a=c.extend({},e,a),function(b){b.on("created",function(b){if(!a.axisX.axisTitle&&!a.axisY.axisTitle)throw new Error("ctAxisTitle plugin - You must provide at least one axis title");if(!b.axisX&&!b.axisY)throw new Error("ctAxisTitle plugin can only be used on charts that have at least one axis");var d,e,f;if(a.axisX.axisTitle&&b.axisX&&(d=b.axisX.axisLength/2+b.options.axisX.offset+b.options.chartPadding.left,e=b.options.chartPadding.top,"end"===b.options.axisX.position&&(e+=b.axisY.axisLength),f=new c.Svg("text"),f.addClass(a.axisX.axisClass),f.text(a.axisX.axisTitle),f.attr({x:d+a.axisX.offset.x,y:e+a.axisX.offset.y,"text-anchor":a.axisX.textAnchor}),b.svg.append(f,!0)),a.axisY.axisTitle&&b.axisY){d=0,e=b.axisY.axisLength/2+b.options.chartPadding.top,"end"===b.options.axisY.position&&(d=b.axisX.axisLength);var g="rotate("+(a.axisY.flipTitle?-90:90)+", "+d+", "+e+")";f=new c.Svg("text"),f.addClass(a.axisY.axisClass),f.text(a.axisY.axisTitle),f.attr({x:d+a.axisY.offset.x,y:e+a.axisY.offset.y,transform:g,"text-anchor":a.axisY.textAnchor}),b.svg.append(f,!0)}})}}}(window,document,Chartist),Chartist.plugins.ctAxisTitle});
!function(a,b){"function"==typeof define&&define.amd?define(["chartist"],function(c){return a.returnExportsGlobal=b(c)}):"object"==typeof exports?module.exports=b(require("chartist")):a["Chartist.plugins.ctAxisTitle"]=b(Chartist)}(this,function(a){return function(a,b,c){"use strict";var d={axisTitle:"",axisClass:"ct-axis-title",offset:{x:0,y:0},textAnchor:"middle",flipTitle:!1},e={axisX:d,axisY:d},f=function(a){return a instanceof Function?a():a},g=function(a){return a instanceof Function?a():a};c.plugins=c.plugins||{},c.plugins.ctAxisTitle=function(a){return a=c.extend({},e,a),function(b){b.on("created",function(b){if(!a.axisX.axisTitle&&!a.axisY.axisTitle)throw new Error("ctAxisTitle plugin - You must provide at least one axis title");if(!b.axisX&&!b.axisY)throw new Error("ctAxisTitle plugin can only be used on charts that have at least one axis");var d,e,h,i=c.normalizePadding(b.options.chartPadding);if(a.axisX.axisTitle&&b.axisX&&(d=b.axisX.axisLength/2+b.options.axisY.offset+i.left,e=i.top,"end"===b.options.axisY.position&&(d-=b.options.axisY.offset),"end"===b.options.axisX.position&&(e+=b.axisY.axisLength),h=new c.Svg("text"),h.addClass(g(a.axisX.axisClass)),h.text(f(a.axisX.axisTitle)),h.attr({x:d+a.axisX.offset.x,y:e+a.axisX.offset.y,"text-anchor":a.axisX.textAnchor}),b.svg.append(h,!0)),a.axisY.axisTitle&&b.axisY){d=0,e=b.axisY.axisLength/2+i.top,"start"===b.options.axisX.position&&(e+=b.options.axisX.offset),"end"===b.options.axisY.position&&(d=b.axisX.axisLength);var j="rotate("+(a.axisY.flipTitle?-90:90)+", "+d+", "+e+")";h=new c.Svg("text"),h.addClass(g(a.axisY.axisClass)),h.text(f(a.axisY.axisTitle)),h.attr({x:d+a.axisY.offset.x,y:e+a.axisY.offset.y,transform:j,"text-anchor":a.axisY.textAnchor}),b.svg.append(h,!0)}})}}}(window,document,a),a.plugins.ctAxisTitle});
//# sourceMappingURL=chartist-plugin-axistitle.min.js.map

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,54 @@
<!DOCTYPE html>
<html>
<head>
<title>My first Chartist Tests</title>
<link rel="stylesheet" href="node_modules/chartist/dist/chartist.min.css">
</head>
<body>
<div class="ct-chart ct-perfect-fourth"></div>
<script src="node_modules/chartist/dist/chartist.js"></script>
<script src="src/scripts/chartist-plugin-axistitle.js"></script>
<script>
var chart = new Chartist.Line('.ct-chart', {
labels: ['0-15', '16-30', '31-45', '46-60', '61-75', '76-90'],
series: [[1, 3, 7, 12, 1, 2, 1, 0]]
}, {
chartPadding: {
top: 20,
right: 0,
bottom: 20,
left: 0
},
axisY: {
onlyInteger: true
},
plugins: [
Chartist.plugins.ctAxisTitle({
axisX: {
axisTitle: 'Time (mins)',
axisClass: 'ct-axis-title-test',
offset: {
x: 0,
y: 50
},
textAnchor: 'middle'
},
axisY: {
axisTitle: 'Goals',
axisClass: 'ct-axis-title-test2',
offset: {
x: 0,
y: -1
},
flipTitle: false
}
})
]
});
</script>
</body>
</html>

View File

@ -0,0 +1,61 @@
{
"name": "chartist-plugin-axistitle",
"description": "Axis Title Plugin for Chartist.js",
"version": "0.0.5",
"author": "Alex Stanbury",
"homepage": "https://alexstanbury.github.io/chartist-plugin-axistitle",
"repository": {
"type": "git",
"url": "https://github.com/alexstanbury/chartist-plugin-axistitle.git"
},
"bugs": {
"url": "https://github.com/alexstanbury/chartist-plugin-axistitle/issues"
},
"keywords": [
"chartist",
"plugin"
],
"files": [
"dist",
"LICENSE",
"package.json",
"README.md"
],
"main": "dist/chartist-plugin-axistitle.js",
"browser": "dist/chartist-plugin-axistitle.js",
"licenses": [
{
"type": "MIT",
"url": "https://github.com/alexstanbury/chartist-plugin-axistitle/blob/master/LICENSE"
}
],
"dependencies": {},
"devDependencies": {
"chartist": "~0.10.1",
"grunt": "^0.4.5",
"grunt-contrib-clean": "^0.6.0",
"grunt-contrib-copy": "^0.7.0",
"grunt-contrib-jasmine": "~0.8.1",
"grunt-contrib-jshint": "~0.10.0",
"grunt-contrib-uglify": "^0.6.0",
"grunt-umd": "~2.2.1",
"grunt-newer": "^0.8.0",
"jasmine-fixture": "~1.2.2",
"jshint-stylish": "~1.0.0",
"load-grunt-config": "^0.16.0",
"time-grunt": "^1.0.0"
},
"engines": {
"node": ">=0.8.0"
},
"scripts": {
"test": "grunt test"
},
"config": {
"banner": "/* chartist-plugin-axistitle <%= pkg.version %>\n * Copyright © <%= year %> Alex Stanbury\n * Free to use under the WTFPL license.\n * http://www.wtfpl.net/\n */\n",
"src": "src",
"dist": "dist",
"tmp": ".tmp",
"test": "test"
}
}

View File

@ -0,0 +1,126 @@
/**
* Chartist.js plugin to display a title for 1 or 2 axes.
* version 0.0.4
* author: alex stanbury
*/
/* global Chartist */
(function (window, document, Chartist) {
'use strict';
var axisDefaults = {
axisTitle: '',
axisClass: 'ct-axis-title',
offset: {
x: 0,
y: 0
},
textAnchor: 'middle',
flipTitle: false
};
var defaultOptions = {
axisX: axisDefaults,
axisY: axisDefaults
};
var getTitle = function (title) {
if (title instanceof Function) {
return title();
}
return title;
};
var getClasses = function (classes) {
if (classes instanceof Function) {
return classes();
}
return classes;
};
Chartist.plugins = Chartist.plugins || {};
Chartist.plugins.ctAxisTitle = function(options) {
options = Chartist.extend({}, defaultOptions, options);
return function ctAxisTitle(chart) {
chart.on('created', function(data) {
if (!options.axisX.axisTitle && !options.axisY.axisTitle) {
throw new Error(
'ctAxisTitle plugin - You must provide at least one axis title'
);
} else if (!data.axisX && !data.axisY) {
throw new Error(
'ctAxisTitle plugin can only be used on charts that have at least one axis'
);
}
var xPos,
yPos,
title,
chartPadding = Chartist.normalizePadding(data.options.chartPadding); // normalize the padding in case the full padding object was not passed into the options
//position axis X title
if (options.axisX.axisTitle && data.axisX) {
xPos = (data.axisX.axisLength / 2) + data.options.axisY.offset +
chartPadding.left;
yPos = chartPadding.top;
if (data.options.axisY.position === 'end') {
xPos -= data.options.axisY.offset;
}
if (data.options.axisX.position === 'end') {
yPos += data.axisY.axisLength;
}
title = new Chartist.Svg("text");
title.addClass(getClasses(options.axisX.axisClass));
title.text(getTitle(options.axisX.axisTitle));
title.attr({
x: xPos + options.axisX.offset.x,
y: yPos + options.axisX.offset.y,
"text-anchor": options.axisX.textAnchor
});
data.svg.append(title, true);
}
//position axis Y title
if (options.axisY.axisTitle && data.axisY) {
xPos = 0;
yPos = (data.axisY.axisLength / 2) + chartPadding
.top;
if (data.options.axisX.position === 'start') {
yPos += data.options.axisX.offset;
}
if (data.options.axisY.position === 'end') {
xPos = data.axisX.axisLength;
}
var transform = 'rotate(' + (options.axisY.flipTitle ? -
90 : 90) + ', ' + xPos + ', ' + yPos + ')';
title = new Chartist.Svg("text");
title.addClass(getClasses(options.axisY.axisClass));
title.text(getTitle(options.axisY.axisTitle));
title.attr({
x: xPos + options.axisY.offset.x,
y: yPos + options.axisY.offset.y,
transform: transform,
"text-anchor": options.axisY.textAnchor
});
data.svg.append(title, true);
}
});
};
};
}(window, document, Chartist));

View File

@ -14,7 +14,7 @@ module.exports = function (grunt) {
dist: {
src: [
'bower_components/chartist/dist/chartist.js',
'<%= pkg.config.src %>/scripts/chartist-plugin-sketchy.js'
'<%= pkg.config.src %>/scripts/chartist-plugin-axistitle.js'
],
options: {
specs: '<%= pkg.config.test %>/spec/**/spec-*.js',

View File

@ -18,7 +18,7 @@ module.exports = function (grunt) {
sourceMapIncludeSources: true
},
files: {
'<%= pkg.config.dist %>/chartist-plugin-sketchy.min.js': ['<%= pkg.config.dist %>/chartist-plugin-sketchy.js']
'<%= pkg.config.dist %>/chartist-plugin-axistitle.min.js': ['<%= pkg.config.dist %>/chartist-plugin-axistitle.js']
}
}
};

View File

@ -0,0 +1,27 @@
/**
* umd
* ===
*
* Wraps the library into an universal module definition (AMD + CommonJS + Global).
*
* Link: https://github.com/bebraw/grunt-umd
*/
'use strict';
module.exports = function (grunt) {
return {
dist: {
src: '<%= pkg.config.src %>/scripts/chartist-plugin-axistitle.js',
dest: '<%= pkg.config.dist %>/chartist-plugin-axistitle.js',
objectToExport: 'Chartist.plugins.ctAxisTitle',
deps: {
default: ['Chartist'],
amd: ['chartist'],
cjs: ['chartist'],
global: ['Chartist']
},
indent: ' '
}
};
};

View File

@ -0,0 +1,36 @@
{
"node": true,
"browser": true,
"esnext": true,
"bitwise": true,
"camelcase": true,
"curly": true,
"eqeqeq": true,
"immed": true,
"indent": 2,
"latedef": true,
"newcap": true,
"noarg": true,
"quotmark": "single",
"regexp": true,
"undef": true,
"unused": true,
"strict": true,
"trailing": true,
"smarttabs": true,
"globals": {
"after": false,
"afterEach": false,
"angular": false,
"before": false,
"beforeEach": false,
"browser": false,
"describe": false,
"expect": false,
"inject": false,
"it": false,
"jasmine": false,
"spyOn": false
}
}

View File

@ -0,0 +1,36 @@
<!doctype html>
<html lang="en">
<head>
<title>End2end Test Runner</title>
</head>
<body>
<header class="page-header">
<h1>Chartist.js
<small> Simple responsive charts</small>
</h1>
<div class="limiter">
<figure>
<svg id="chartist-guy"></svg>
</figure>
</div>
</header>
<article class="main" role="main">
<section class="documentation-section">
<header>
<h2>Chart CSS animation example</h2>
</header>
<div class="content">
<div class="chart-container">
<svg id="chart"></svg>
</div>
</div>
<aside class="side-notes">
<p>Specifying the style of your chart in CSS is not only cleaner but also enables you to use awesome CSS
animations
and transitions to be applied to your SVG elements!</p>
</aside>
</section>
</article>
</body>
</html>

View File

@ -0,0 +1,15 @@
describe('ctAxisTitle', function () {
'use strict';
beforeEach(function () {
});
afterEach(function () {
});
it('should be defined in chartist', function () {
expect(window.Chartist.plugins.ctAxisTitle).toBeDefined();
});
});

View File

@ -1,6 +1,6 @@
{
"name": "chartist-plugin-fill-donut",
"version": "0.0.1-beta",
"version": "0.0.4",
"authors": [
"moxx <mo@sbg.at>"
],
@ -29,13 +29,13 @@
"dependencies": {
"chartist": "~0.9.4"
},
"_release": "0.0.1-beta",
"_release": "0.0.4",
"_resolution": {
"type": "version",
"tag": "v0.0.1-beta",
"commit": "60167d5f4bdfcb15d32da6bfa129f0d76de9ed71"
"tag": "v0.0.4",
"commit": "65854b555ec620d8b458dcbf7331db730b9c0e04"
},
"_source": "git://github.com/moxx/chartist-plugin-fill-donut.git",
"_source": "https://github.com/moxx/chartist-plugin-fill-donut.git",
"_target": "~0.0.1",
"_originalSource": "chartist-plugin-fill-donut"
}

View File

@ -2,20 +2,34 @@ var gulp = require('gulp'),
sourcemaps = require('gulp-sourcemaps'),
watch = require('gulp-watch'),
rename = require('gulp-rename'),
uglify= require('gulp-uglify');
uglify = require('gulp-uglify'),
umd = require('gulp-umd')
path = require('path');
var umdSettings = {
namespace: function(file) {
return 'Chartist.plugins.fillDonut';
},
exports: function(file) {
return 'Chartist.plugins.fillDonut';
},
template: path.join(__dirname, 'returnExports.js')
};
gulp.task('js', function(){
gulp.task('js', function(file){
return gulp.src( 'src/scripts/chartist-plugin-fill-donut.js' )
.pipe(sourcemaps.init())
.pipe(umd(umdSettings))
.pipe(sourcemaps.write('./'))
.pipe( gulp.dest('dist/') );
.pipe(gulp.dest('dist/') );
});
gulp.task('js-min', function(){
return gulp.src( 'src/scripts/chartist-plugin-fill-donut.js' )
.pipe(sourcemaps.init())
.pipe( uglify() ).on('error', function (error) {
.pipe(umd(umdSettings))
.pipe(uglify() ).on('error', function (error) {
console.error('' + error);
this.emit('end');
})
@ -23,8 +37,8 @@ gulp.task('js-min', function(){
extname: ".min.js"
}))
.pipe(sourcemaps.write('./'))
.pipe( gulp.dest('dist/') )
.pipe( gulp.dest('examples/js/') );
.pipe(gulp.dest('dist/') )
.pipe(gulp.dest('examples/js/') );
});
//run default gulp tasks

View File

@ -0,0 +1,7 @@
Copyright (c) 2016 mo@sbg.at
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -109,4 +109,8 @@ var chart = new Chartist.Pie('#chart-e1', {
stroke: #efefef;
opacity: 1;
}
```
```
## License
The FillDonut plugin for Chartist is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

View File

@ -1,6 +1,6 @@
{
"name": "chartist-plugin-fill-donut",
"version": "0.0.1-beta",
"version": "0.0.4",
"authors": [
"moxx <mo@sbg.at>"
],

View File

@ -1,5 +1,14 @@
;(function(root, factory) {
if (typeof define === 'function' && define.amd) {
define([], factory);
} else if (typeof exports === 'object') {
module.exports = factory();
} else {
root['Chartist.plugins.fillDonut'] = factory();
}
}(this, function() {
/**
* Chartist.js plugin to pre fill donouts with animations
* Chartist.js plugin to pre fill donuts with animations
* author: moxx
* author-url: https://github.com/moxx/chartist-plugin-fill-donut
*
@ -9,11 +18,11 @@
var defaultOptions = {
fillClass: 'ct-fill-donut',
label : {
label: {
html: '<div></div>',
class: 'ct-fill-donut-label test'
},
items : [{}]
items: [{}]
};
Chartist.plugins = Chartist.plugins || {};
@ -25,7 +34,7 @@
$chart.css('position', 'relative');
var $svg;
chart.on('draw', function(data) {
function drawDonut(data){
if(data.type == 'slice'){
if(data.index == 0)
$svg = $chart.find('svg').eq(0);
@ -41,17 +50,26 @@
$svg.prepend($clone);
}
}
chart.on('draw', function(data) {
drawDonut(data);
});
chart.on('created', function(data){
var itemIndex = 0;
if(chart.options.fillDonutOptions){
options = Chartist.extend({}, options, chart.options.fillDonutOptions);
drawDonut(data);
}
$.each(options.items, function(){
var $wrapper = $(options.label.html).addClass(options.label.class);
var item = $.extend({}, {
class : '',
class: '',
id: '',
content : 'fillText',
content: 'fillText',
position: 'center', //bottom, top, left, right
offsetY: 0, //top, bottom in px
offsetX: 0 //left, right in px
@ -80,24 +98,24 @@
var wHeight = $wrapper.height() / 2;
var style = {
bottom : {
bottom : 0 + item.offsetY,
bottom: {
bottom: 0 + item.offsetY,
left: (cWidth - wWidth) + item.offsetX,
},
top : {
top : 0 + item.offsetY,
top: {
top: 0 + item.offsetY,
left: (cWidth - wWidth) + item.offsetX,
},
left : {
top : (cHeight - wHeight) + item.offsetY,
left: {
top: (cHeight - wHeight) + item.offsetY,
left: 0 + item.offsetX,
},
right : {
top : (cHeight - wHeight) + item.offsetY,
right: {
top: (cHeight - wHeight) + item.offsetY,
right: 0 + item.offsetX,
},
center : {
top : (cHeight - wHeight) + item.offsetY,
center: {
top: (cHeight - wHeight) + item.offsetY,
left: (cWidth - wWidth) + item.offsetX,
}
};
@ -111,4 +129,7 @@
}(window, document, Chartist));
return Chartist.plugins.fillDonut;
}));
//# sourceMappingURL=chartist-plugin-fill-donut.js.map

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
!function(t,e,i){"use strict";var s={fillClass:"ct-fill-donut",label:{html:"<div></div>","class":"ct-fill-donut-label test"},items:[{}]};i.plugins=i.plugins||{},i.plugins.fillDonut=function(t){return t=i.extend({},s,t),function(e){if(e instanceof i.Pie){var s=$(e.container);s.css("position","relative");var n;e.on("draw",function(e){if("slice"==e.type){0==e.index&&(n=s.find("svg").eq(0));var i=$(e.group._node).clone();i.attr("class",i.attr("class")+" "+t.fillClass),i.find("path").each(function(){$(this).find("animate").remove(),$(this).removeAttr("stroke-dashoffset")}),n.prepend(i)}}),e.on("created",function(e){var i=0;$.each(t.items,function(){var e=$(t.label.html).addClass(t.label["class"]),n=$.extend({},{"class":"",id:"",content:"fillText",position:"center",offsetY:0,offsetX:0},this);$(n.content);n.id.length>0&&e.attr("id",n.id),n["class"].length>0&&e.addClass("class",n["class"]),s.find('*[data-fill-index$="fdid-'+i+'"]').remove(),e.attr("data-fill-index","fdid-"+i),i++,e.append(n.content).css({position:"absolute"}),s.append(e);var o=s.innerWidth()/2,f=s.height()/2,l=e.innerWidth()/2,a=e.height()/2,d={bottom:{bottom:0+n.offsetY,left:o-l+n.offsetX},top:{top:0+n.offsetY,left:o-l+n.offsetX},left:{top:f-a+n.offsetY,left:0+n.offsetX},right:{top:f-a+n.offsetY,right:0+n.offsetX},center:{top:f-a+n.offsetY,left:o-l+n.offsetX}};e.css(d[n.position])})})}}}}(window,document,Chartist);
!function(t,e){"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?module.exports=e():t["Chartist.plugins.fillDonut"]=e()}(this,function(){return function(t,e,i){"use strict";var n={fillClass:"ct-fill-donut",label:{html:"<div></div>","class":"ct-fill-donut-label test"},items:[{}]};i.plugins=i.plugins||{},i.plugins.fillDonut=function(t){return t=i.extend({},n,t),function(e){function n(e){if("slice"==e.type){0==e.index&&(s=o.find("svg").eq(0));var i=$(e.group._node).clone();i.attr("class",i.attr("class")+" "+t.fillClass),i.find("path").each(function(){$(this).find("animate").remove(),$(this).removeAttr("stroke-dashoffset")}),s.prepend(i)}}if(e instanceof i.Pie){var o=$(e.container);o.css("position","relative");var s;e.on("draw",function(t){n(t)}),e.on("created",function(s){var f=0;e.options.fillDonutOptions&&(t=i.extend({},t,e.options.fillDonutOptions),n(s)),$.each(t.items,function(){var e=$(t.label.html).addClass(t.label["class"]),i=$.extend({},{"class":"",id:"",content:"fillText",position:"center",offsetY:0,offsetX:0},this);$(i.content);i.id.length>0&&e.attr("id",i.id),i["class"].length>0&&e.addClass("class",i["class"]),o.find('*[data-fill-index$="fdid-'+f+'"]').remove(),e.attr("data-fill-index","fdid-"+f),f++,e.append(i.content).css({position:"absolute"}),o.append(e);var n=o.innerWidth()/2,s=o.height()/2,l=e.innerWidth()/2,a=e.height()/2,d={bottom:{bottom:0+i.offsetY,left:n-l+i.offsetX},top:{top:0+i.offsetY,left:n-l+i.offsetX},left:{top:s-a+i.offsetY,left:0+i.offsetX},right:{top:s-a+i.offsetY,right:0+i.offsetX},center:{top:s-a+i.offsetY,left:n-l+i.offsetX}};e.css(d[i.position])})})}}}}(window,document,Chartist),Chartist.plugins.fillDonut});
//# sourceMappingURL=chartist-plugin-fill-donut.min.js.map

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
!function(t,e,i){"use strict";var s={fillClass:"ct-fill-donut",label:{html:"<div></div>","class":"ct-fill-donut-label test"},items:[{}]};i.plugins=i.plugins||{},i.plugins.fillDonut=function(t){return t=i.extend({},s,t),function(e){if(e instanceof i.Pie){var s=$(e.container);s.css("position","relative");var n;e.on("draw",function(e){if("slice"==e.type){0==e.index&&(n=s.find("svg").eq(0));var i=$(e.group._node).clone();i.attr("class",i.attr("class")+" "+t.fillClass),i.find("path").each(function(){$(this).find("animate").remove(),$(this).removeAttr("stroke-dashoffset")}),n.prepend(i)}}),e.on("created",function(e){var i=0;$.each(t.items,function(){var e=$(t.label.html).addClass(t.label["class"]),n=$.extend({},{"class":"",id:"",content:"fillText",position:"center",offsetY:0,offsetX:0},this);$(n.content);n.id.length>0&&e.attr("id",n.id),n["class"].length>0&&e.addClass("class",n["class"]),s.find('*[data-fill-index$="fdid-'+i+'"]').remove(),e.attr("data-fill-index","fdid-"+i),i++,e.append(n.content).css({position:"absolute"}),s.append(e);var o=s.innerWidth()/2,f=s.height()/2,l=e.innerWidth()/2,a=e.height()/2,d={bottom:{bottom:0+n.offsetY,left:o-l+n.offsetX},top:{top:0+n.offsetY,left:o-l+n.offsetX},left:{top:f-a+n.offsetY,left:0+n.offsetX},right:{top:f-a+n.offsetY,right:0+n.offsetX},center:{top:f-a+n.offsetY,left:o-l+n.offsetX}};e.css(d[n.position])})})}}}}(window,document,Chartist);
!function(t,e){"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?module.exports=e():t["Chartist.plugins.fillDonut"]=e()}(this,function(){return function(t,e,i){"use strict";var n={fillClass:"ct-fill-donut",label:{html:"<div></div>","class":"ct-fill-donut-label test"},items:[{}]};i.plugins=i.plugins||{},i.plugins.fillDonut=function(t){return t=i.extend({},n,t),function(e){function n(e){if("slice"==e.type){0==e.index&&(s=o.find("svg").eq(0));var i=$(e.group._node).clone();i.attr("class",i.attr("class")+" "+t.fillClass),i.find("path").each(function(){$(this).find("animate").remove(),$(this).removeAttr("stroke-dashoffset")}),s.prepend(i)}}if(e instanceof i.Pie){var o=$(e.container);o.css("position","relative");var s;e.on("draw",function(t){n(t)}),e.on("created",function(s){var f=0;e.options.fillDonutOptions&&(t=i.extend({},t,e.options.fillDonutOptions),n(s)),$.each(t.items,function(){var e=$(t.label.html).addClass(t.label["class"]),i=$.extend({},{"class":"",id:"",content:"fillText",position:"center",offsetY:0,offsetX:0},this);$(i.content);i.id.length>0&&e.attr("id",i.id),i["class"].length>0&&e.addClass("class",i["class"]),o.find('*[data-fill-index$="fdid-'+f+'"]').remove(),e.attr("data-fill-index","fdid-"+f),f++,e.append(i.content).css({position:"absolute"}),o.append(e);var n=o.innerWidth()/2,s=o.height()/2,l=e.innerWidth()/2,a=e.height()/2,d={bottom:{bottom:0+i.offsetY,left:n-l+i.offsetX},top:{top:0+i.offsetY,left:n-l+i.offsetX},left:{top:s-a+i.offsetY,left:0+i.offsetX},right:{top:s-a+i.offsetY,right:0+i.offsetX},center:{top:s-a+i.offsetY,left:n-l+i.offsetX}};e.css(d[i.position])})})}}}}(window,document,Chartist),Chartist.plugins.fillDonut});
//# sourceMappingURL=chartist-plugin-fill-donut.min.js.map

File diff suppressed because one or more lines are too long

View File

@ -1,12 +1,13 @@
{
"name": "chartist-plugin-fill-donut",
"version": "0.0.1",
"version": "0.0.4",
"description": "",
"main": "packages.json",
"private": true,
"dependencies": {},
"main": "./dist/chartist-plugin-fill-donut.js",
"dependencies": {
},
"devDependencies": {
"gulp-rename": "^1.2.2",
"gulp-umd": "^0.2.0",
"gulp-sourcemaps": "^1.5.2",
"gulp-uglify": "^1.4.1",
"gulp-watch": "^4.3.5"

View File

@ -0,0 +1,12 @@
;(function(root, factory) {
if (typeof define === 'function' && define.amd) {
define(<%= amd %>, factory);
} else if (typeof exports === 'object') {
module.exports = factory(<%= cjs %>);
} else {
root['<%= namespace %>'] = factory(<%= global %>);
}
}(this, function(<%= param %>) {
<%= contents %>
return <%= exports %>;
}));

View File

@ -1,5 +1,5 @@
/**
* Chartist.js plugin to pre fill donouts with animations
* Chartist.js plugin to pre fill donuts with animations
* author: moxx
* author-url: https://github.com/moxx/chartist-plugin-fill-donut
*
@ -9,11 +9,11 @@
var defaultOptions = {
fillClass: 'ct-fill-donut',
label : {
label: {
html: '<div></div>',
class: 'ct-fill-donut-label test'
},
items : [{}]
items: [{}]
};
Chartist.plugins = Chartist.plugins || {};
@ -25,7 +25,7 @@
$chart.css('position', 'relative');
var $svg;
chart.on('draw', function(data) {
function drawDonut(data){
if(data.type == 'slice'){
if(data.index == 0)
$svg = $chart.find('svg').eq(0);
@ -41,17 +41,26 @@
$svg.prepend($clone);
}
}
chart.on('draw', function(data) {
drawDonut(data);
});
chart.on('created', function(data){
var itemIndex = 0;
if(chart.options.fillDonutOptions){
options = Chartist.extend({}, options, chart.options.fillDonutOptions);
drawDonut(data);
}
$.each(options.items, function(){
var $wrapper = $(options.label.html).addClass(options.label.class);
var item = $.extend({}, {
class : '',
class: '',
id: '',
content : 'fillText',
content: 'fillText',
position: 'center', //bottom, top, left, right
offsetY: 0, //top, bottom in px
offsetX: 0 //left, right in px
@ -80,24 +89,24 @@
var wHeight = $wrapper.height() / 2;
var style = {
bottom : {
bottom : 0 + item.offsetY,
bottom: {
bottom: 0 + item.offsetY,
left: (cWidth - wWidth) + item.offsetX,
},
top : {
top : 0 + item.offsetY,
top: {
top: 0 + item.offsetY,
left: (cWidth - wWidth) + item.offsetX,
},
left : {
top : (cHeight - wHeight) + item.offsetY,
left: {
top: (cHeight - wHeight) + item.offsetY,
left: 0 + item.offsetX,
},
right : {
top : (cHeight - wHeight) + item.offsetY,
right: {
top: (cHeight - wHeight) + item.offsetY,
right: 0 + item.offsetX,
},
center : {
top : (cHeight - wHeight) + item.offsetY,
center: {
top: (cHeight - wHeight) + item.offsetY,
left: (cWidth - wWidth) + item.offsetX,
}
};

View File

@ -1,6 +1,6 @@
{
"name": "chartist-plugin-pointlabels",
"version": "0.0.4",
"version": "0.0.6",
"main": [
"./dist/chartist-plugin-pointlabels.min.js"
],
@ -16,13 +16,13 @@
"test"
],
"homepage": "https://github.com/gionkunz/chartist-plugin-pointlabels",
"_release": "0.0.4",
"_release": "0.0.6",
"_resolution": {
"type": "version",
"tag": "v0.0.4",
"commit": "79998d64435d4bfea36d92592c1d2fa51b21d5ae"
"tag": "0.0.6",
"commit": "dc45db288c208d63047a55f6362ee05ec2f1a46d"
},
"_source": "git://github.com/gionkunz/chartist-plugin-pointlabels.git",
"_source": "https://github.com/gionkunz/chartist-plugin-pointlabels.git",
"_target": "~0.0.4",
"_originalSource": "chartist-plugin-pointlabels"
}

View File

@ -5,6 +5,12 @@ as an example plugin package and can be used as starting point to create your ow
Please visit http://gionkunz.github.io/chartist-js/plugins.html for more information.
## Download
The easiest way to get started, using Bower
```
bower install chartist-plugin-pointlabels --save
```
## Available options and their defaults
```javascript

View File

@ -1,18 +1,18 @@
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define([], function () {
return (root.returnExportsGlobal = factory());
define(["chartist"], function (Chartist) {
return (root.returnExportsGlobal = factory(Chartist));
});
} else if (typeof exports === 'object') {
// Node. Does not work with strict CommonJS, but
// only CommonJS-like enviroments that support module.exports,
// like Node.
module.exports = factory();
module.exports = factory(require("chartist"));
} else {
root['Chartist.plugins.ctPointLabels'] = factory();
root['Chartist.plugins.ctPointLabels'] = factory(Chartist);
}
}(this, function () {
}(this, function (Chartist) {
/**
* Chartist.js plugin to display a data label on top of the points in a line chart.
@ -29,23 +29,63 @@
y: -10
},
textAnchor: 'middle',
align: 'center',
labelInterpolationFnc: Chartist.noop
};
var labelPositionCalculation = {
point: function(data) {
return {
x: data.x,
y: data.y
};
},
bar: {
left: function(data) {
return {
x: data.x1,
y: data.y1
};
},
center: function(data) {
return {
x: data.x1 + (data.x2 - data.x1) / 2,
y: data.y1
};
},
right: function(data) {
return {
x: data.x2,
y: data.y1
};
}
}
};
Chartist.plugins = Chartist.plugins || {};
Chartist.plugins.ctPointLabels = function(options) {
options = Chartist.extend({}, defaultOptions, options);
function addLabel(position, data) {
// if x and y exist concat them otherwise output only the existing value
var value = data.value.x !== undefined && data.value.y ?
(data.value.x + ', ' + data.value.y) :
data.value.y || data.value.x;
data.group.elem('text', {
x: position.x + options.labelOffset.x,
y: position.y + options.labelOffset.y,
style: 'text-anchor: ' + options.textAnchor
}, options.labelClass).text(options.labelInterpolationFnc(value));
}
return function ctPointLabels(chart) {
if(chart instanceof Chartist.Line) {
if (chart instanceof Chartist.Line || chart instanceof Chartist.Bar) {
chart.on('draw', function(data) {
if(data.type === 'point') {
data.group.elem('text', {
x: data.x + options.labelOffset.x,
y: data.y + options.labelOffset.y,
style: 'text-anchor: ' + options.textAnchor
}, options.labelClass).text(options.labelInterpolationFnc(data.value.x === undefined ? data.value.y : data.value.x + ', ' + data.value.y));
var positonCalculator = labelPositionCalculation[data.type] && labelPositionCalculation[data.type][options.align] || labelPositionCalculation[data.type];
if (positonCalculator) {
addLabel(positonCalculator(data), data);
}
});
}
@ -53,6 +93,7 @@
};
}(window, document, Chartist));
return Chartist.plugins.ctPointLabels;
}));

View File

@ -1,8 +1,8 @@
/* chartist-plugin-pointlabels 0.0.4
* Copyright © 2015 Gion Kunz
/* chartist-plugin-pointlabels 0.0.6
* Copyright © 2018 Gion Kunz
* Free to use under the WTFPL license.
* http://www.wtfpl.net/
*/
!function(a,b){"function"==typeof define&&define.amd?define([],function(){return a.returnExportsGlobal=b()}):"object"==typeof exports?module.exports=b():a["Chartist.plugins.ctPointLabels"]=b()}(this,function(){return function(a,b,c){"use strict";var d={labelClass:"ct-label",labelOffset:{x:0,y:-10},textAnchor:"middle",labelInterpolationFnc:c.noop};c.plugins=c.plugins||{},c.plugins.ctPointLabels=function(a){return a=c.extend({},d,a),function(b){b instanceof c.Line&&b.on("draw",function(b){"point"===b.type&&b.group.elem("text",{x:b.x+a.labelOffset.x,y:b.y+a.labelOffset.y,style:"text-anchor: "+a.textAnchor},a.labelClass).text(a.labelInterpolationFnc(void 0===b.value.x?b.value.y:b.value.x+", "+b.value.y))})}}}(window,document,Chartist),Chartist.plugins.ctPointLabels});
!function(a,b){"function"==typeof define&&define.amd?define(["chartist"],function(c){return a.returnExportsGlobal=b(c)}):"object"==typeof exports?module.exports=b(require("chartist")):a["Chartist.plugins.ctPointLabels"]=b(Chartist)}(this,function(a){return function(a,b,c){"use strict";var d={labelClass:"ct-label",labelOffset:{x:0,y:-10},textAnchor:"middle",align:"center",labelInterpolationFnc:c.noop},e={point:function(a){return{x:a.x,y:a.y}},bar:{left:function(a){return{x:a.x1,y:a.y1}},center:function(a){return{x:a.x1+(a.x2-a.x1)/2,y:a.y1}},right:function(a){return{x:a.x2,y:a.y1}}}};c.plugins=c.plugins||{},c.plugins.ctPointLabels=function(a){function b(b,c){var d=void 0!==c.value.x&&c.value.y?c.value.x+", "+c.value.y:c.value.y||c.value.x;c.group.elem("text",{x:b.x+a.labelOffset.x,y:b.y+a.labelOffset.y,style:"text-anchor: "+a.textAnchor},a.labelClass).text(a.labelInterpolationFnc(d))}return a=c.extend({},d,a),function(d){(d instanceof c.Line||d instanceof c.Bar)&&d.on("draw",function(c){var d=e[c.type]&&e[c.type][a.align]||e[c.type];d&&b(d(c),c)})}}}(window,document,a),a.plugins.ctPointLabels});
//# sourceMappingURL=chartist-plugin-pointlabels.min.js.map

View File

@ -1 +1 @@
{"version":3,"file":"chartist-plugin-pointlabels.min.js","sources":["chartist-plugin-pointlabels.js"],"names":["root","factory","define","amd","returnExportsGlobal","exports","module","this","window","document","Chartist","defaultOptions","labelClass","labelOffset","x","y","textAnchor","labelInterpolationFnc","noop","plugins","ctPointLabels","options","extend","chart","Line","on","data","type","group","elem","style","text","undefined","value"],"mappings":";;;;;;CAAC,SAAUA,EAAMC,GACO,kBAAXC,SAAyBA,OAAOC,IAEzCD,UAAW,WACT,MAAQF,GAAKI,oBAAsBH,MAET,gBAAZI,SAIhBC,OAAOD,QAAUJ,IAEjBD,EAAK,kCAAoCC,KAE3CM,KAAM,WAyCN,MAlCC,UAASC,EAAQC,EAAUC,GAC1B,YAEA,IAAIC,IACFC,WAAY,WACZC,aACEC,EAAG,EACHC,EAAG,KAELC,WAAY,SACZC,sBAAuBP,EAASQ,KAGlCR,GAASS,QAAUT,EAASS,YAC5BT,EAASS,QAAQC,cAAgB,SAASC,GAIxC,MAFAA,GAAUX,EAASY,UAAWX,EAAgBU,GAEvC,SAAuBE,GACzBA,YAAiBb,GAASc,MAC3BD,EAAME,GAAG,OAAQ,SAASC,GACP,UAAdA,EAAKC,MACND,EAAKE,MAAMC,KAAK,QACdf,EAAGY,EAAKZ,EAAIO,EAAQR,YAAYC,EAChCC,EAAGW,EAAKX,EAAIM,EAAQR,YAAYE,EAChCe,MAAO,gBAAkBT,EAAQL,YAChCK,EAAQT,YAAYmB,KAAKV,EAAQJ,sBAAuCe,SAAjBN,EAAKO,MAAMnB,EAAkBY,EAAKO,MAAMlB,EAAIW,EAAKO,MAAMnB,EAAI,KAAOY,EAAKO,MAAMlB,SAOjJP,OAAQC,SAAUC,UACbA,SAASS,QAAQC","sourcesContent":["(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define([], function () {\n return (root.returnExportsGlobal = factory());\n });\n } else if (typeof exports === 'object') {\n // Node. Does not work with strict CommonJS, but\n // only CommonJS-like enviroments that support module.exports,\n // like Node.\n module.exports = factory();\n } else {\n root['Chartist.plugins.ctPointLabels'] = factory();\n }\n}(this, function () {\n\n /**\n * Chartist.js plugin to display a data label on top of the points in a line chart.\n *\n */\n /* global Chartist */\n (function(window, document, Chartist) {\n 'use strict';\n\n var defaultOptions = {\n labelClass: 'ct-label',\n labelOffset: {\n x: 0,\n y: -10\n },\n textAnchor: 'middle',\n labelInterpolationFnc: Chartist.noop\n };\n\n Chartist.plugins = Chartist.plugins || {};\n Chartist.plugins.ctPointLabels = function(options) {\n\n options = Chartist.extend({}, defaultOptions, options);\n\n return function ctPointLabels(chart) {\n if(chart instanceof Chartist.Line) {\n chart.on('draw', function(data) {\n if(data.type === 'point') {\n data.group.elem('text', {\n x: data.x + options.labelOffset.x,\n y: data.y + options.labelOffset.y,\n style: 'text-anchor: ' + options.textAnchor\n }, options.labelClass).text(options.labelInterpolationFnc(data.value.x === undefined ? data.value.y : data.value.x + ', ' + data.value.y));\n }\n });\n }\n };\n };\n\n }(window, document, Chartist));\n return Chartist.plugins.ctPointLabels;\n\n}));\n"]}
{"version":3,"sources":["chartist-plugin-pointlabels.js"],"names":["root","factory","define","amd","Chartist","returnExportsGlobal","exports","module","require","this","window","document","defaultOptions","labelClass","labelOffset","x","y","textAnchor","align","labelInterpolationFnc","noop","labelPositionCalculation","point","data","bar","left","x1","y1","center","x2","right","plugins","ctPointLabels","options","addLabel","position","value","undefined","group","elem","style","text","extend","chart","Line","Bar","on","positonCalculator","type"],"mappings":";;;;;;CAAC,SAAUA,EAAMC,GACO,kBAAXC,SAAyBA,OAAOC,IAEzCD,QAAQ,YAAa,SAAUE,GAC7B,MAAQJ,GAAKK,oBAAsBJ,EAAQG,KAEjB,gBAAZE,SAIhBC,OAAOD,QAAUL,EAAQO,QAAQ,aAEjCR,EAAK,kCAAoCC,EAAQG,WAEnDK,KAAM,SAAUL,GAkFhB,MA3EC,UAASM,EAAQC,EAAUP,GAC1B,YAEA,IAAIQ,IACFC,WAAY,WACZC,aACEC,EAAG,EACHC,GAAI,IAENC,WAAY,SACZC,MAAO,SACPC,sBAAuBf,EAASgB,MAG9BC,GACFC,MAAO,SAASC,GACd,OACER,EAAGQ,EAAKR,EACRC,EAAGO,EAAKP,IAGZQ,KACEC,KAAM,SAASF,GACb,OACER,EAAGQ,EAAKG,GACRV,EAAGO,EAAKI,KAGZC,OAAQ,SAASL,GACf,OACER,EAAGQ,EAAKG,IAAMH,EAAKM,GAAKN,EAAKG,IAAM,EACnCV,EAAGO,EAAKI,KAGZG,MAAO,SAASP,GACd,OACER,EAAGQ,EAAKM,GACRb,EAAGO,EAAKI,MAMhBvB,GAAS2B,QAAU3B,EAAS2B,YAC5B3B,EAAS2B,QAAQC,cAAgB,SAASC,GAIxC,QAASC,GAASC,EAAUZ,GAE1B,GAAIa,OAAyBC,KAAjBd,EAAKa,MAAMrB,GAAmBQ,EAAKa,MAAMpB,EAClDO,EAAKa,MAAMrB,EAAI,KAAOQ,EAAKa,MAAMpB,EAClCO,EAAKa,MAAMpB,GAAKO,EAAKa,MAAMrB,CAE7BQ,GAAKe,MAAMC,KAAK,QACdxB,EAAGoB,EAASpB,EAAIkB,EAAQnB,YAAYC,EACpCC,EAAGmB,EAASnB,EAAIiB,EAAQnB,YAAYE,EACpCwB,MAAO,gBAAkBP,EAAQhB,YAChCgB,EAAQpB,YAAY4B,KAAKR,EAAQd,sBAAsBiB,IAG5D,MAfAH,GAAU7B,EAASsC,UAAW9B,EAAgBqB,GAevC,SAAuBU,IACxBA,YAAiBvC,GAASwC,MAAQD,YAAiBvC,GAASyC,MAC9DF,EAAMG,GAAG,OAAQ,SAASvB,GACxB,GAAIwB,GAAoB1B,EAAyBE,EAAKyB,OAAS3B,EAAyBE,EAAKyB,MAAMf,EAAQf,QAAUG,EAAyBE,EAAKyB,KAC/ID,IACFb,EAASa,EAAkBxB,GAAOA,QAO5Cb,OAAQC,SAAUP,GAEbA,EAAS2B,QAAQC","file":"chartist-plugin-pointlabels.min.js","sourcesContent":["(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define([\"chartist\"], function (Chartist) {\n return (root.returnExportsGlobal = factory(Chartist));\n });\n } else if (typeof exports === 'object') {\n // Node. Does not work with strict CommonJS, but\n // only CommonJS-like enviroments that support module.exports,\n // like Node.\n module.exports = factory(require(\"chartist\"));\n } else {\n root['Chartist.plugins.ctPointLabels'] = factory(Chartist);\n }\n}(this, function (Chartist) {\n\n /**\n * Chartist.js plugin to display a data label on top of the points in a line chart.\n *\n */\n /* global Chartist */\n (function(window, document, Chartist) {\n 'use strict';\n\n var defaultOptions = {\n labelClass: 'ct-label',\n labelOffset: {\n x: 0,\n y: -10\n },\n textAnchor: 'middle',\n align: 'center',\n labelInterpolationFnc: Chartist.noop\n };\n\n var labelPositionCalculation = {\n point: function(data) {\n return {\n x: data.x,\n y: data.y\n };\n },\n bar: {\n left: function(data) {\n return {\n x: data.x1,\n y: data.y1\n };\n },\n center: function(data) {\n return {\n x: data.x1 + (data.x2 - data.x1) / 2,\n y: data.y1\n };\n },\n right: function(data) {\n return {\n x: data.x2,\n y: data.y1\n };\n }\n }\n };\n\n Chartist.plugins = Chartist.plugins || {};\n Chartist.plugins.ctPointLabels = function(options) {\n\n options = Chartist.extend({}, defaultOptions, options);\n\n function addLabel(position, data) {\n // if x and y exist concat them otherwise output only the existing value\n var value = data.value.x !== undefined && data.value.y ?\n (data.value.x + ', ' + data.value.y) :\n data.value.y || data.value.x;\n\n data.group.elem('text', {\n x: position.x + options.labelOffset.x,\n y: position.y + options.labelOffset.y,\n style: 'text-anchor: ' + options.textAnchor\n }, options.labelClass).text(options.labelInterpolationFnc(value));\n }\n\n return function ctPointLabels(chart) {\n if (chart instanceof Chartist.Line || chart instanceof Chartist.Bar) {\n chart.on('draw', function(data) {\n var positonCalculator = labelPositionCalculation[data.type] && labelPositionCalculation[data.type][options.align] || labelPositionCalculation[data.type];\n if (positonCalculator) {\n addLabel(positonCalculator(data), data);\n }\n });\n }\n };\n };\n\n }(window, document, Chartist));\n\n return Chartist.plugins.ctPointLabels;\n\n}));\n"]}

View File

@ -13,7 +13,7 @@ module.exports = function (grunt) {
return {
dist: {
src: [
'bower_components/chartist/dist/chartist.js',
'node_modules/chartist/dist/chartist.js',
'<%= pkg.config.src %>/scripts/chartist-plugin-pointlabels.js'
],
options: {

View File

@ -15,7 +15,13 @@ module.exports = function (grunt) {
src: '<%= pkg.config.src %>/scripts/chartist-plugin-pointlabels.js',
dest: '<%= pkg.config.dist %>/chartist-plugin-pointlabels.js',
objectToExport: 'Chartist.plugins.ctPointLabels',
indent: ' '
indent: ' ',
deps: {
default: ['Chartist'],
amd: ['chartist'],
cjs: ['chartist'],
global: ['Chartist']
}
}
};
};

View File

@ -1,28 +0,0 @@
{
"name": "chartist-plugin-sketchy",
"version": "0.0.2",
"main": [
"./dist/chartist-plugin-sketchy.min.js"
],
"devDependencies": {
"chartist": "~0.8.0"
},
"ignore": [
".*",
"Gruntfile.js",
"package.json",
"node_modules",
"src",
"test"
],
"homepage": "https://github.com/gionkunz/chartist-plugin-sketchy",
"_release": "0.0.2",
"_resolution": {
"type": "version",
"tag": "v0.0.2",
"commit": "36ab0977eeaf7ca5417808c3c907dacd32c05429"
},
"_source": "git://github.com/gionkunz/chartist-plugin-sketchy.git",
"_target": "~0.0.2",
"_originalSource": "chartist-plugin-sketchy"
}

View File

@ -1,63 +0,0 @@
# Sketchy plugin for Chartist.js
This plugin will make your Chartist.js charts look like hand drawn!
Please visit http://gionkunz.github.io/chartist-js/plugins.html for more information.
## Available options and their defaults
```javascript
var defaultOptions = {
filterPrefix: 'ctSketchyFilter',
filterType: 'fractalNoise',
filterBaseFrequency: 0.05,
filterNumOctaves: 2,
filterScale: 5,
overrides: {}
};
```
You can specify overrides for each draw type in Chartist (label, line, point, bar etc.). Specify the draw type as property
and then override the filter settings (type, baseFrequency, numOctaves and scale without the filter* prefix).
## Sample usage in Chartist.js
```javascript
new Chartist.Bar('.ct-chart', {
labels: ['Q1', 'Q2', 'Q3', 'Q4'],
series: [
[800000, 1200000, 1400000, 1300000],
[200000, 400000, 500000, 300000],
[100000, 200000, 400000, 600000]
]
}, {
plugins: [
Chartist.plugins.ctSketchy({
overrides: {
grid: {
baseFrequency: 0.2,
scale: 5,
numOctaves: 1
},
bar: {
baseFrequency: 0.02,
scale: 10
},
label: false
}
})
],
stackBars: true,
axisY: {
labelInterpolationFnc: function(value) {
return (value / 1000) + 'k';
}
}
}).on('draw', function(data) {
if(data.type === 'bar') {
data.element.attr({
style: 'stroke-width: 30px'
});
}
});
```

View File

@ -1,18 +0,0 @@
{
"name": "chartist-plugin-sketchy",
"version": "0.0.2",
"main": [
"./dist/chartist-plugin-sketchy.min.js"
],
"devDependencies": {
"chartist": "~0.8.0"
},
"ignore": [
".*",
"Gruntfile.js",
"package.json",
"node_modules",
"src",
"test"
]
}

View File

@ -1,13 +0,0 @@
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.

View File

@ -1,111 +0,0 @@
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define([], function () {
return (root.returnExportsGlobal = factory());
});
} else if (typeof exports === 'object') {
// Node. Does not work with strict CommonJS, but
// only CommonJS-like enviroments that support module.exports,
// like Node.
module.exports = factory();
} else {
root['Chartist.plugins.ctSketchy'] = factory();
}
}(this, function () {
/**
* Chartist.js plugin to render sketchy charts that look hand drawn using SVG filters.
*
*/
/* global Chartist */
(function(window, document, Chartist) {
'use strict';
var defaultOptions = {
filterPrefix: 'ctSketchyFilter',
filterType: 'fractalNoise',
filterBaseFrequency: 0.05,
filterNumOctaves: 2,
filterScale: 5,
overrides: {}
};
Chartist.plugins = Chartist.plugins || {};
Chartist.plugins.ctSketchy = function(options) {
options = Chartist.extend({}, defaultOptions, options);
return function ctPointLabels(chart) {
chart.on('created', function(data) {
var defs = data.svg.elem('defs'),
baseFilter = defs.elem('filter', {
id: options.filterPrefix
});
baseFilter.elem('feTurbulence', {
type: options.filterType,
baseFrequency: options.filterBaseFrequency,
numOctaves: options.filterNumOctaves,
result: [options.filterPrefix, 'Turbulence'].join('')
});
baseFilter.elem('feDisplacementMap', {
xChannelSelector: 'R',
yChannelSelector: 'G',
in: 'SourceGraphic',
in2: [options.filterPrefix, 'Turbulence'].join(''),
scale: options.filterScale
});
Object.keys(options.overrides).forEach(function(overrideKey) {
var override = options.overrides[overrideKey];
if(override === false) {
return;
}
var overrideFilter = defs.elem('filter', {
id: [options.filterPrefix, overrideKey].join('')
});
overrideFilter.elem('feTurbulence', {
type: override.type || options.filterType,
baseFrequency: override.baseFrequency || options.filterBaseFrequency,
numOctaves: override.numOctaves || options.filterNumOctaves,
result: [options.filterPrefix, overrideKey, 'Turbulence'].join('')
});
overrideFilter.elem('feDisplacementMap', {
xChannelSelector: 'R',
yChannelSelector: 'G',
in: 'SourceGraphic',
in2: [options.filterPrefix, overrideKey, 'Turbulence'].join(''),
scale: override.scale || options.filterScale
});
});
});
chart.on('draw', function(data) {
if(options.overrides[data.type] !== false) {
var filterName = options.overrides[data.type] ? [options.filterPrefix, data.type].join('') : options.filterPrefix,
filterAttributes = {
filter: ['url(#', filterName, ')'].join('')
};
if(data.type === 'label') {
data.group.attr(filterAttributes);
} else {
data.element.attr(filterAttributes);
}
}
});
};
};
}(window, document, Chartist));
return Chartist.plugins.ctSketchy;
}));

View File

@ -1,8 +0,0 @@
/* chartist-plugin-sketchy 0.0.2
* Copyright © 2015 Gion Kunz
* Free to use under the WTFPL license.
* http://www.wtfpl.net/
*/
!function(a,b){"function"==typeof define&&define.amd?define([],function(){return a.returnExportsGlobal=b()}):"object"==typeof exports?module.exports=b():a["Chartist.plugins.ctSketchy"]=b()}(this,function(){return function(a,b,c){"use strict";var d={filterPrefix:"ctSketchyFilter",filterType:"fractalNoise",filterBaseFrequency:.05,filterNumOctaves:2,filterScale:5,overrides:{}};c.plugins=c.plugins||{},c.plugins.ctSketchy=function(a){return a=c.extend({},d,a),function(b){b.on("created",function(b){var c=b.svg.elem("defs"),d=c.elem("filter",{id:a.filterPrefix});d.elem("feTurbulence",{type:a.filterType,baseFrequency:a.filterBaseFrequency,numOctaves:a.filterNumOctaves,result:[a.filterPrefix,"Turbulence"].join("")}),d.elem("feDisplacementMap",{xChannelSelector:"R",yChannelSelector:"G","in":"SourceGraphic",in2:[a.filterPrefix,"Turbulence"].join(""),scale:a.filterScale}),Object.keys(a.overrides).forEach(function(b){var d=a.overrides[b];if(d!==!1){var e=c.elem("filter",{id:[a.filterPrefix,b].join("")});e.elem("feTurbulence",{type:d.type||a.filterType,baseFrequency:d.baseFrequency||a.filterBaseFrequency,numOctaves:d.numOctaves||a.filterNumOctaves,result:[a.filterPrefix,b,"Turbulence"].join("")}),e.elem("feDisplacementMap",{xChannelSelector:"R",yChannelSelector:"G","in":"SourceGraphic",in2:[a.filterPrefix,b,"Turbulence"].join(""),scale:d.scale||a.filterScale})}})}),b.on("draw",function(b){if(a.overrides[b.type]!==!1){var c=a.overrides[b.type]?[a.filterPrefix,b.type].join(""):a.filterPrefix,d={filter:["url(#",c,")"].join("")};"label"===b.type?b.group.attr(d):b.element.attr(d)}})}}}(window,document,Chartist),Chartist.plugins.ctSketchy});
//# sourceMappingURL=chartist-plugin-sketchy.min.js.map

File diff suppressed because one or more lines are too long

View File

@ -1,21 +0,0 @@
/**
* umd
* ===
*
* Wraps the library into an universal module definition (AMD + CommonJS + Global).
*
* Link: https://github.com/bebraw/grunt-umd
*/
'use strict';
module.exports = function (grunt) {
return {
dist: {
src: '<%= pkg.config.src %>/scripts/chartist-plugin-sketchy.js',
dest: '<%= pkg.config.dist %>/chartist-plugin-sketchy.js',
objectToExport: 'Chartist.plugins.ctSketchy',
indent: ' '
}
};
};

View File

@ -0,0 +1,33 @@
{
"name": "chartist-plugin-targetline",
"description": "Target line plugin for Chartist.js charting library",
"main": "chartist-plugin-targetline.js",
"authors": [
"Harry Twyford"
],
"license": "ISC",
"keywords": [
"chartist",
"plugin",
"charting",
"charts"
],
"homepage": "https://github.com/htwyford/chartist-plugin-targetline",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"version": "1.0.1",
"_release": "1.0.1",
"_resolution": {
"type": "version",
"tag": "v1.0.1",
"commit": "b6918ad872f9d8f9e6913c50ed0e2a82d91078a1"
},
"_source": "https://github.com/htwyford/chartist-plugin-targetline.git",
"_target": "~1.0.0",
"_originalSource": "chartist-plugin-targetline"
}

View File

@ -0,0 +1,5 @@
Copyright 2017 Harry Twyford
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

View File

@ -0,0 +1,48 @@
# Target Line plugin for Chartist.js
A plugin for Chartist.js that allows the drawing of a target line on a chart.
## Download
Download from npm:
`npm install chartist-plugin-targetline`
or bower:
`bower install chartist-plugin-targetline`
## Available options and their defaults
```javascript
var defaultOptions = {
value = null,
class = 'ct-target-line'
};
```
## Sample usage in Chartist.js
```javascript
var chart = new Chartist.Line('.ct-chart', {
labels: [1, 2, 3, 4, 5, 6, 7],
series: [
[1, 5, 3, 4, 6, 2, 3],
[2, 4, 2, 5, 4, 3, 6]
]
}, {
plugins: [
ctTargetLine({
value: 1000
})
]
});
```
```css
.ct-target-line {
stroke: blue;
stroke-width: 2px;
stroke-dasharray: 4px;
shape-rendering: crispEdges;
}
```

View File

@ -0,0 +1,23 @@
{
"name": "chartist-plugin-targetline",
"description": "Target line plugin for Chartist.js charting library",
"main": "chartist-plugin-targetline.js",
"authors": [
"Harry Twyford"
],
"license": "ISC",
"keywords": [
"chartist",
"plugin",
"charting",
"charts"
],
"homepage": "https://github.com/htwyford/chartist-plugin-targetline",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
]
}

View File

@ -0,0 +1,38 @@
/**
* Chartist.js plugin to display a target line on a chart.
* With code from @gionkunz in https://github.com/gionkunz/chartist-js/issues/235
* and @OscarGodson in https://github.com/gionkunz/chartist-js/issues/491.
* Based on https://github.com/gionkunz/chartist-plugin-pointlabels
*/
/* global Chartist */
(function(window, document, Chartist) {
'use strict';
var defaultOptions = {
class: 'ct-target-line',
value: null
};
Chartist.plugins = Chartist.plugins || {};
Chartist.plugins.ctTargetLine = function(options) {
options = Chartist.extend({}, defaultOptions, options);
return function ctTargetLine(chart) {
function projectY(chartRect, bounds, value) {
return chartRect.y1 - (chartRect.height() / bounds.max * value)
}
chart.on('created', function (context) {
var targetLineY = projectY(context.chartRect, context.bounds, options.value);
context.svg.elem('line', {
x1: context.chartRect.x1,
x2: context.chartRect.x2,
y1: targetLineY,
y2: targetLineY
}, options.class);
});
};
};
}(window, document, Chartist));

View File

@ -0,0 +1,7 @@
/**
* Chartist.js plugin to display a target line on a chart.
* With code from @gionkunz in https://github.com/gionkunz/chartist-js/issues/235
* and @OscarGodson in https://github.com/gionkunz/chartist-js/issues/491.
* Based on https://github.com/gionkunz/chartist-plugin-pointlabels
*/
!function(t,n,e){"use strict";var c={class:"ct-target-line",value:null};e.plugins=e.plugins||{},e.plugins.ctTargetLine=function(t){return t=e.extend({},c,t),function(n){function e(t,n,e){return t.y1-t.height()/n.max*e}n.on("created",function(n){var c=e(n.chartRect,n.bounds,t.value);n.svg.elem("line",{x1:n.chartRect.x1,x2:n.chartRect.x2,y1:c,y2:c},t.class)})}}}(window,document,Chartist);

View File

@ -0,0 +1,25 @@
{
"name": "chartist-plugin-targetline",
"version": "1.0.1",
"description": "Target line plugin for Chartist.js charting library",
"main": "chartist-plugin-targetline.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://github.com/htwyford/chartist-plugin-targetline.git"
},
"keywords": [
"chartist",
"plugin",
"charting",
"charts"
],
"author": "Harry Twyford",
"license": "ISC",
"bugs": {
"url": "https://github.com/htwyford/chartist-plugin-targetline/issues"
},
"homepage": "https://github.com/htwyford/chartist-plugin-targetline#readme"
}

View File

@ -22,7 +22,7 @@
"tag": "0.0.2",
"commit": "28fab7ba79dd682470df5b2064b32d7ac6e6d1fe"
},
"_source": "git://github.com/gionkunz/chartist-plugin-threshold.git",
"_source": "https://github.com/gionkunz/chartist-plugin-threshold.git",
"_target": "~0.0.1",
"_originalSource": "chartist-plugin-threshold"
}

View File

@ -1,8 +1,8 @@
{
"name": "chartist-plugin-tooltip",
"version": "0.0.12",
"main": [
"./dist/chartist-plugin-tooltip.min.js"
"./dist/chartist-plugin-tooltip.min.js",
"./dist/chartist-plugin-tooltip.css"
],
"dependencies": {
"chartist": "~0.9.4"
@ -16,11 +16,12 @@
"test"
],
"homepage": "https://github.com/Globegitter/chartist-plugin-tooltip",
"_release": "0.0.12",
"version": "0.0.18",
"_release": "0.0.18",
"_resolution": {
"type": "version",
"tag": "v0.0.12",
"commit": "bb4a43bd0088f37e2d9d80259396593d4b6899d7"
"tag": "v0.0.18",
"commit": "9917bad5e271b9e7cad289ca2ff0f07a8f8f5231"
},
"_source": "https://github.com/Globegitter/chartist-plugin-tooltip.git",
"_target": "~0.0.12",

View File

@ -4,12 +4,24 @@ This plugin provides quick and easy tooltips for your chartist charts. Touch sup
Please visit http://gionkunz.github.io/chartist-js/plugins.html for more information.
NPM package: https://www.npmjs.com/package/chartist-plugin-tooltips
## Available options and their defaults
```javascript
var defaultOptions = {
currency: null //accepts '£', '$', '€', etc.
currency: undefined, //accepts '£', '$', '€', etc.
//e.g. 4000 => €4,000
tooltipFnc: undefined, //accepts function
//build custom tooltip
transformTooltipTextFnc: undefined, // accepts function
// transform tooltip text
class: undefined, // accecpts 'class1', 'class1 class2', etc.
//adds class(es) to tooltip wrapper
anchorToPoint: false, //accepts true or false
//tooltips do not follow mouse movement -- they are anchored to the point / bar.
appendToBody: false //accepts true or false
//appends tooltips to body instead of chart container
};
```
@ -23,13 +35,13 @@ var chart = new Chartist.Line('.ct-chart', {
labels: [1, 2, 3],
series: [
[
{meta: 'description', value: 1 },
{meta: 'description', value: 5},
{meta: 'description', value: 1},
{meta: 'description', value: 5},
{meta: 'description', value: 3}
],
[
{meta: 'other description', value: 2},
{meta: 'other description', value: 4},
{meta: 'other description', value: 2},
{meta: 'other description', value: 4},
{meta: 'other description', value: 2}
]
]
@ -40,7 +52,7 @@ var chart = new Chartist.Line('.ct-chart', {
});
```
without:
Without descriptive text:
```js
var chart = new Chartist.Line('.ct-chart', {
labels: [1, 2, 3, 4, 5, 6, 7],
@ -54,3 +66,76 @@ var chart = new Chartist.Line('.ct-chart', {
]
});
```
With options text:
```js
var chart = new Chartist.Line('.ct-chart', {
labels: [1, 2, 3],
series: [
[
{meta: 'description', value: 1},
{meta: 'description', value: 5},
{meta: 'description', value: 3}
],
[
{meta: 'other description', value: 2},
{meta: 'other description', value: 4},
{meta: 'other description', value: 2}
]
]
}, {
plugins: [
Chartist.plugins.tooltip({
currency: '$',
class: 'class1 class2',
appendToBody: true
})
]
});
```
## Custom point element.
In ChartistJS you can replace default element with smth different.
There is a pretty [demo](https://gionkunz.github.io/chartist-js/examples.html) (*USING EVENTS TO REPLACE GRAPHICS*).
And if you want the tooltip to work fine with a new element, you need to include two more properties:
```javascript
'ct:value': data.value.y,
'ct:meta': data.meta,
```
So the final code could look like this. Here is a [live demo](https://jsfiddle.net/AlexanderKozhevin/aapycL87/)
```javascript
chart.on('draw', function(data) {
// If the draw event was triggered from drawing a point on the line chart
if(data.type === 'point') {
// We are creating a new path SVG element that draws a triangle around the point coordinates
var circle = new Chartist.Svg('circle', {
cx: [data.x],
cy: [data.y],
r: [5],
'ct:value': data.value.y,
'ct:meta': data.meta,
class: 'my-cool-point',
}, 'ct-area');
// With data.element we get the Chartist SVG wrapper and we can replace the original point drawn by Chartist with our newly created triangle
data.element.replace(circle);
}
});
```
```javascript
plugins: [
Chartist.plugins.tooltip({
appendToBody: true,
pointClass: 'my-cool-point'
})
]
```

View File

@ -1,8 +1,8 @@
{
"name": "chartist-plugin-tooltip",
"version": "0.0.12",
"main": [
"./dist/chartist-plugin-tooltip.min.js"
"./dist/chartist-plugin-tooltip.min.js",
"./dist/chartist-plugin-tooltip.css"
],
"dependencies": {
"chartist": "~0.9.4"

View File

@ -0,0 +1,34 @@
.chartist-tooltip {
position: absolute;
display: inline-block;
opacity: 0;
min-width: 5em;
padding: .5em;
background: #F4C63D;
color: #453D3F;
font-family: Oxygen,Helvetica,Arial,sans-serif;
font-weight: 700;
text-align: center;
pointer-events: none;
z-index: 1;
-webkit-transition: opacity .2s linear;
-moz-transition: opacity .2s linear;
-o-transition: opacity .2s linear;
transition: opacity .2s linear; }
.chartist-tooltip:before {
content: "";
position: absolute;
top: 100%;
left: 50%;
width: 0;
height: 0;
margin-left: -15px;
border: 15px solid transparent;
border-top-color: #F4C63D; }
.chartist-tooltip.tooltip-show {
opacity: 1; }
.ct-area, .ct-line {
pointer-events: none; }
/*# sourceMappingURL=chartist-plugin-tooltip.css.map */

View File

@ -0,0 +1,7 @@
{
"version": 3,
"mappings": "AAEA,iBAAkB;EAChB,QAAQ,EAAE,QAAQ;EAClB,OAAO,EAAE,YAAY;EACrB,OAAO,EAAE,CAAC;EACV,SAAS,EAAE,GAAG;EACd,OAAO,EAAE,IAAI;EACb,UAAU,EARO,OAAO;EASxB,KAAK,EARe,OAAO;EAS3B,WAAW,EAAE,iCAAiC;EAC9C,WAAW,EAAE,GAAG;EAChB,UAAU,EAAE,MAAM;EAClB,cAAc,EAAE,IAAI;EACpB,OAAO,EAAE,CAAC;EACV,kBAAkB,EAAE,kBAAkB;EACtC,eAAe,EAAE,kBAAkB;EACnC,aAAa,EAAE,kBAAkB;EACjC,UAAU,EAAE,kBAAkB;EAC9B,wBAAS;IACP,OAAO,EAAE,EAAE;IACX,QAAQ,EAAE,QAAQ;IAClB,GAAG,EAAE,IAAI;IACT,IAAI,EAAE,GAAG;IACT,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,CAAC;IACT,WAAW,EAAE,KAAK;IAClB,MAAM,EAAE,sBAAsB;IAC9B,gBAAgB,EA5BD,OAAO;EA8BxB,8BAAe;IACb,OAAO,EAAE,CAAC;;AAId,kBAAmB;EACjB,cAAc,EAAE,IAAI",
"sources": ["../scss/chartist-plugin-tooltip.scss"],
"names": [],
"file": "chartist-plugin-tooltip.css"
}

View File

@ -1,18 +1,18 @@
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define([], function () {
return (root.returnExportsGlobal = factory());
define(["chartist"], function (Chartist) {
return (root.returnExportsGlobal = factory(Chartist));
});
} else if (typeof exports === 'object') {
// Node. Does not work with strict CommonJS, but
// only CommonJS-like enviroments that support module.exports,
// like Node.
module.exports = factory();
module.exports = factory(require("chartist"));
} else {
root['Chartist.plugins.tooltips'] = factory();
root['Chartist.plugins.tooltip'] = factory(Chartist);
}
}(this, function () {
}(this, function (Chartist) {
/**
* Chartist.js plugin to display a data label on top of the points in a line chart.
@ -20,144 +20,187 @@
*/
/* global Chartist */
(function (window, document, Chartist) {
'use strict';
'use strict';
var defaultOptions = {
currency: undefined,
tooltipOffset: {
x: 0,
y: -20
var defaultOptions = {
currency: undefined,
currencyFormatCallback: undefined,
tooltipOffset: {
x: 0,
y: -20
},
anchorToPoint: false,
appendToBody: false,
class: undefined,
pointClass: 'ct-point'
};
Chartist.plugins = Chartist.plugins || {};
Chartist.plugins.tooltip = function (options) {
options = Chartist.extend({}, defaultOptions, options);
return function tooltip(chart) {
var tooltipSelector = options.pointClass;
if (chart instanceof Chartist.Bar) {
tooltipSelector = 'ct-bar';
} else if (chart instanceof Chartist.Pie) {
// Added support for donut graph
if (chart.options.donut) {
tooltipSelector = 'ct-slice-donut';
} else {
tooltipSelector = 'ct-slice-pie';
}
// showTooltips: true,
// tooltipEvents: ['mousemove', 'touchstart', 'touchmove'],
// labelClass: 'ct-label',
// labelOffset: {
// x: 0,
// y: -10
// },
// textAnchor: 'middle'
};
}
Chartist.plugins = Chartist.plugins || {};
Chartist.plugins.tooltip = function (options) {
options = Chartist.extend({}, defaultOptions, options);
return function tooltip(chart) {
var tooltipSelector = 'ct-point';
if (chart instanceof Chartist.Bar) {
tooltipSelector = 'ct-bar';
} else if (chart instanceof Chartist.Pie) {
// Added support for donut graph
if (chart.options.donut) {
tooltipSelector = 'ct-slice-donut';
} else {
tooltipSelector = 'ct-slice-pie';
}
}
var $chart = chart.container;
var $toolTip = $chart.querySelector('.chartist-tooltip');
if (!$toolTip) {
$toolTip = document.createElement('div');
$toolTip.className = 'chartist-tooltip';
$chart.appendChild($toolTip);
}
var height = $toolTip.offsetHeight;
var width = $toolTip.offsetWidth;
hide($toolTip);
function on(event, selector, callback) {
$chart.addEventListener(event, function (e) {
if (!selector || hasClass(e.target, selector))
callback(e);
});
}
on('mouseover', tooltipSelector, function (event) {
var $point = event.target;
var tooltipText = '';
var meta = $point.getAttribute('ct:meta') || '';
var value = $point.getAttribute('ct:value');
if (options.tooltipFnc) {
tooltipText = options.tooltipFnc(meta, value);
} else {
if (meta) {
tooltipText += meta + '<br>';
} else {
// For Pie Charts also take the labels into account
// Could add support for more charts here as well!
if (chart instanceof Chartist.Pie) {
var label = next($point, 'ct-label');
if (label.length > 0) {
tooltipText += text(label) + '<br>';
}
}
}
if (options.currency) {
value = options.currency + value.replace(/(\d)(?=(\d{3})+(?:\.\d+)?$)/g, "$1,");
}
tooltipText += value;
}
$toolTip.innerHTML = tooltipText;
setPosition(event);
show($toolTip);
// Remember height and width to avoid wrong position in IE
height = $toolTip.offsetHeight;
width = $toolTip.offsetWidth;
});
on('mouseout', tooltipSelector, function () {
hide($toolTip);
});
on('mousemove', null, function (event) {
setPosition(event);
});
function setPosition(event) {
// For some reasons, on FF, we can't rely on event.offsetX and event.offsetY,
// that's why we prioritize event.layerX and event.layerY
// see https://github.com/gionkunz/chartist-js/issues/381
height = height || $toolTip.offsetHeight;
width = width || $toolTip.offsetWidth;
$toolTip.style.top = (event.layerY || event.offsetY) - height + options.tooltipOffset.y + 'px';
$toolTip.style.left = (event.layerX || event.offsetX) - width / 2 + options.tooltipOffset.x + 'px';
}
var $chart = chart.container;
var $toolTip = $chart.querySelector('.chartist-tooltip');
if (!$toolTip) {
$toolTip = document.createElement('div');
$toolTip.className = (!options.class) ? 'chartist-tooltip' : 'chartist-tooltip ' + options.class;
if (!options.appendToBody) {
$chart.appendChild($toolTip);
} else {
document.body.appendChild($toolTip);
}
};
}
var height = $toolTip.offsetHeight;
var width = $toolTip.offsetWidth;
function show(element) {
element.style.display = 'block';
}
hide($toolTip);
function hide(element) {
element.style.display = 'none';
}
function on(event, selector, callback) {
$chart.addEventListener(event, function (e) {
if (!selector || hasClass(e.target, selector))
callback(e);
});
}
function hasClass(element, className) {
return (' ' + element.getAttribute('class') + ' ').indexOf(' ' + className + ' ') > -1;
}
on('mouseover', tooltipSelector, function (event) {
var $point = event.target;
var tooltipText = '';
function next(element, className) {
do {
element = element.nextSibling;
} while (element && !hasClass(element, className));
return element;
}
var isPieChart = (chart instanceof Chartist.Pie) ? $point : $point.parentNode;
var seriesName = (isPieChart) ? $point.parentNode.getAttribute('ct:meta') || $point.parentNode.getAttribute('ct:series-name') : '';
var meta = $point.getAttribute('ct:meta') || seriesName || '';
var hasMeta = !!meta;
var value = $point.getAttribute('ct:value');
function text(element) {
return element.innerText || element.textContent;
if (options.transformTooltipTextFnc && typeof options.transformTooltipTextFnc === 'function') {
value = options.transformTooltipTextFnc(value);
}
if (options.tooltipFnc && typeof options.tooltipFnc === 'function') {
tooltipText = options.tooltipFnc(meta, value);
} else {
if (options.metaIsHTML) {
var txt = document.createElement('textarea');
txt.innerHTML = meta;
meta = txt.value;
}
meta = '<span class="chartist-tooltip-meta">' + meta + '</span>';
if (hasMeta) {
tooltipText += meta + '<br>';
} else {
// For Pie Charts also take the labels into account
// Could add support for more charts here as well!
if (chart instanceof Chartist.Pie) {
var label = next($point, 'ct-label');
if (label) {
tooltipText += text(label) + '<br>';
}
}
}
if (value) {
if (options.currency) {
if (options.currencyFormatCallback != undefined) {
value = options.currencyFormatCallback(value, options);
} else {
value = options.currency + value.replace(/(\d)(?=(\d{3})+(?:\.\d+)?$)/g, '$1,');
}
}
value = '<span class="chartist-tooltip-value">' + value + '</span>';
tooltipText += value;
}
}
if(tooltipText) {
$toolTip.innerHTML = tooltipText;
setPosition(event);
show($toolTip);
// Remember height and width to avoid wrong position in IE
height = $toolTip.offsetHeight;
width = $toolTip.offsetWidth;
}
});
on('mouseout', tooltipSelector, function () {
hide($toolTip);
});
on('mousemove', null, function (event) {
if (false === options.anchorToPoint)
setPosition(event);
});
function setPosition(event) {
height = height || $toolTip.offsetHeight;
width = width || $toolTip.offsetWidth;
var offsetX = - width / 2 + options.tooltipOffset.x
var offsetY = - height + options.tooltipOffset.y;
var anchorX, anchorY;
if (!options.appendToBody) {
var box = $chart.getBoundingClientRect();
var left = event.pageX - box.left - window.pageXOffset ;
var top = event.pageY - box.top - window.pageYOffset ;
if (true === options.anchorToPoint && event.target.x2 && event.target.y2) {
anchorX = parseInt(event.target.x2.baseVal.value);
anchorY = parseInt(event.target.y2.baseVal.value);
}
$toolTip.style.top = (anchorY || top) + offsetY + 'px';
$toolTip.style.left = (anchorX || left) + offsetX + 'px';
} else {
$toolTip.style.top = event.pageY + offsetY + 'px';
$toolTip.style.left = event.pageX + offsetX + 'px';
}
}
}
};
function show(element) {
if(!hasClass(element, 'tooltip-show')) {
element.className = element.className + ' tooltip-show';
}
}
function hide(element) {
var regex = new RegExp('tooltip-show' + '\\s*', 'gi');
element.className = element.className.replace(regex, '').trim();
}
function hasClass(element, className) {
return (' ' + element.getAttribute('class') + ' ').indexOf(' ' + className + ' ') > -1;
}
function next(element, className) {
do {
element = element.nextSibling;
} while (element && !hasClass(element, className));
return element;
}
function text(element) {
return element.innerText || element.textContent;
}
} (window, document, Chartist));
return Chartist.plugins.tooltips;
return Chartist.plugins.tooltip;
}));

View File

@ -1,8 +1,8 @@
/* chartist-plugin-pointlabels 0.0.7
* Copyright © 2015 Gion Kunz
/* chartist-plugin-tooltip 0.0.17
* Copyright © 2017 Markus Padourek
* Free to use under the WTFPL license.
* http://www.wtfpl.net/
*/
!function(a,b){"function"==typeof define&&define.amd?define([],function(){return a.returnExportsGlobal=b()}):"object"==typeof exports?module.exports=b():a["Chartist.plugins.tooltips"]=b()}(this,function(){return function(a,b,c){"use strict";function d(a){a.style.display="block"}function e(a){a.style.display="none"}function f(a,b){return(" "+a.getAttribute("class")+" ").indexOf(" "+b+" ")>-1}function g(a,b){do a=a.nextSibling;while(a&&!f(a,b));return a}function h(a){return a.innerText||a.textContent}var i={currency:void 0,tooltipOffset:{x:0,y:-20}};c.plugins=c.plugins||{},c.plugins.tooltip=function(a){return a=c.extend({},i,a),function(i){function j(a,b,c){m.addEventListener(a,function(a){(!b||f(a.target,b))&&c(a)})}function k(b){o=o||n.offsetHeight,p=p||n.offsetWidth,n.style.top=(b.layerY||b.offsetY)-o+a.tooltipOffset.y+"px",n.style.left=(b.layerX||b.offsetX)-p/2+a.tooltipOffset.x+"px"}var l="ct-point";i instanceof c.Bar?l="ct-bar":i instanceof c.Pie&&(l=i.options.donut?"ct-slice-donut":"ct-slice-pie");var m=i.container,n=m.querySelector(".chartist-tooltip");n||(n=b.createElement("div"),n.className="chartist-tooltip",m.appendChild(n));var o=n.offsetHeight,p=n.offsetWidth;e(n),j("mouseover",l,function(b){var e=b.target,f="",j=e.getAttribute("ct:meta")||"",l=e.getAttribute("ct:value");if(a.tooltipFnc)f=a.tooltipFnc(j,l);else{if(j)f+=j+"<br>";else if(i instanceof c.Pie){var m=g(e,"ct-label");m.length>0&&(f+=h(m)+"<br>")}a.currency&&(l=a.currency+l.replace(/(\d)(?=(\d{3})+(?:\.\d+)?$)/g,"$1,")),f+=l}n.innerHTML=f,k(b),d(n),o=n.offsetHeight,p=n.offsetWidth}),j("mouseout",l,function(){e(n)}),j("mousemove",null,function(a){k(a)})}}}(window,document,Chartist),Chartist.plugins.tooltips});
!function(a,b){"function"==typeof define&&define.amd?define(["chartist"],function(c){return a.returnExportsGlobal=b(c)}):"object"==typeof exports?module.exports=b(require("chartist")):a["Chartist.plugins.tooltip"]=b(Chartist)}(this,function(a){return function(a,b,c){"use strict";function d(a){f(a,"tooltip-show")||(a.className=a.className+" tooltip-show")}function e(a){var b=new RegExp("tooltip-show\\s*","gi");a.className=a.className.replace(b,"").trim()}function f(a,b){return(" "+a.getAttribute("class")+" ").indexOf(" "+b+" ")>-1}function g(a,b){do{a=a.nextSibling}while(a&&!f(a,b));return a}function h(a){return a.innerText||a.textContent}var i={currency:void 0,currencyFormatCallback:void 0,tooltipOffset:{x:0,y:-20},anchorToPoint:!1,appendToBody:!1,class:void 0,pointClass:"ct-point"};c.plugins=c.plugins||{},c.plugins.tooltip=function(j){return j=c.extend({},i,j),function(i){function k(a,b,c){n.addEventListener(a,function(a){b&&!f(a.target,b)||c(a)})}function l(b){p=p||o.offsetHeight,q=q||o.offsetWidth;var c,d,e=-q/2+j.tooltipOffset.x,f=-p+j.tooltipOffset.y;if(j.appendToBody)o.style.top=b.pageY+f+"px",o.style.left=b.pageX+e+"px";else{var g=n.getBoundingClientRect(),h=b.pageX-g.left-a.pageXOffset,i=b.pageY-g.top-a.pageYOffset;!0===j.anchorToPoint&&b.target.x2&&b.target.y2&&(c=parseInt(b.target.x2.baseVal.value),d=parseInt(b.target.y2.baseVal.value)),o.style.top=(d||i)+f+"px",o.style.left=(c||h)+e+"px"}}var m=j.pointClass;i instanceof c.Bar?m="ct-bar":i instanceof c.Pie&&(m=i.options.donut?"ct-slice-donut":"ct-slice-pie");var n=i.container,o=n.querySelector(".chartist-tooltip");o||(o=b.createElement("div"),o.className=j.class?"chartist-tooltip "+j.class:"chartist-tooltip",j.appendToBody?b.body.appendChild(o):n.appendChild(o));var p=o.offsetHeight,q=o.offsetWidth;e(o),k("mouseover",m,function(a){var e=a.target,f="",k=i instanceof c.Pie?e:e.parentNode,m=k?e.parentNode.getAttribute("ct:meta")||e.parentNode.getAttribute("ct:series-name"):"",n=e.getAttribute("ct:meta")||m||"",r=!!n,s=e.getAttribute("ct:value");if(j.transformTooltipTextFnc&&"function"==typeof j.transformTooltipTextFnc&&(s=j.transformTooltipTextFnc(s)),j.tooltipFnc&&"function"==typeof j.tooltipFnc)f=j.tooltipFnc(n,s);else{if(j.metaIsHTML){var t=b.createElement("textarea");t.innerHTML=n,n=t.value}if(n='<span class="chartist-tooltip-meta">'+n+"</span>",r)f+=n+"<br>";else if(i instanceof c.Pie){var u=g(e,"ct-label");u&&(f+=h(u)+"<br>")}s&&(j.currency&&(s=void 0!=j.currencyFormatCallback?j.currencyFormatCallback(s,j):j.currency+s.replace(/(\d)(?=(\d{3})+(?:\.\d+)?$)/g,"$1,")),s='<span class="chartist-tooltip-value">'+s+"</span>",f+=s)}f&&(o.innerHTML=f,l(a),d(o),p=o.offsetHeight,q=o.offsetWidth)}),k("mouseout",m,function(){e(o)}),k("mousemove",null,function(a){!1===j.anchorToPoint&&l(a)})}}}(window,document,a),a.plugins.tooltip});
//# sourceMappingURL=chartist-plugin-tooltip.min.js.map

File diff suppressed because one or more lines are too long

View File

@ -10,6 +10,7 @@ default:
# create the plugin
build:
- 'clean:dist'
- 'sass:dist'
- 'copy:dist'
- 'umd'
- 'uglify:dist'

View File

@ -16,6 +16,14 @@ module.exports = function (grunt) {
{
dest: '<%= pkg.config.dist %>/',
src: 'LICENSE'
},
{
cwd: '<%= pkg.config.src %>',
expand: true,
flatten: true,
filter: 'isFile',
dest: '<%= pkg.config.dist %>/',
src: 'css/**',
}
]
}

View File

@ -14,7 +14,8 @@ module.exports = function (grunt) {
dist: {
src: [
'bower_components/chartist/dist/chartist.js',
'<%= pkg.config.src %>/scripts/<%= pkg.name %>.js'
'node_modules/chartist/dist/chartist.js',
'<%= pkg.config.src %>/scripts/<%= pkg.config.src_name %>.js'
],
options: {
specs: '<%= pkg.config.test %>/spec/**/spec-*.js',

View File

@ -0,0 +1,24 @@
/**
* sass
* ======
*
* Compile scss to css
*
* Link: https://github.com/gruntjs/grunt-contrib-sass
*/
'use strict';
module.exports = function (grunt) {
return {
dist: {
files: [{
expand: true,
cwd: '<%= pkg.config.src %>/scss',
src: ['*.scss'],
dest: '<%= pkg.config.src %>/css',
ext: '.css'
}]
}
};
};

View File

@ -18,7 +18,7 @@ module.exports = function (grunt) {
sourceMapIncludeSources: true
},
files: {
'<%= pkg.config.dist %>/<%= pkg.name %>.min.js': ['<%= pkg.config.dist %>/<%= pkg.name %>.js']
'<%= pkg.config.dist %>/<%= pkg.config.src_name %>.min.js': ['<%= pkg.config.dist %>/<%= pkg.config.src_name %>.js']
}
}
};

View File

@ -12,9 +12,15 @@
module.exports = function (grunt) {
return {
dist: {
src: '<%= pkg.config.src %>/scripts/<%= pkg.name %>.js',
dest: '<%= pkg.config.dist %>/<%= pkg.name %>.js',
objectToExport: 'Chartist.plugins.tooltips',
src: '<%= pkg.config.src %>/scripts/<%= pkg.config.src_name %>.js',
dest: '<%= pkg.config.dist %>/<%= pkg.config.src_name %>.js',
objectToExport: 'Chartist.plugins.tooltip',
deps: {
default: ['Chartist'],
amd: ['chartist'],
cjs: ['chartist'],
global: ['Chartist']
},
indent: ' '
}
};

View File

@ -1,6 +1,5 @@
{
"name": "chartist",
"version": "0.9.0",
"main": [
"./dist/chartist.min.js",
"./dist/chartist.min.css"
@ -12,10 +11,13 @@
"compass-mixins": "~1.0.2",
"codemirror": "~4.12.0",
"base64": "~0.3.0",
"chartist-plugin-pointlabels": "~0.0.3",
"chartist-plugin-sketchy": "~0.0.2",
"chartist-plugin-pointlabels": "~0.0.4",
"chartist-plugin-accessibility": "~0.0.2",
"chartist-plugin-tooltip": "~0.0.8",
"chartist-plugin-tooltip": "~0.0.12",
"chartist-plugin-axistitle": "~0.0.1",
"chartist-plugin-threshold": "~0.0.1",
"chartist-plugin-fill-donut": "~0.0.1",
"chartist-plugin-zoom": "~0.2.1",
"matchMedia": "~0.2.0"
},
"ignore": [
@ -30,16 +32,17 @@
"test"
],
"resolutions": {
"chartist": "~0.8.0"
"chartist": "~0.9.0"
},
"homepage": "https://github.com/gionkunz/chartist-js",
"_release": "0.9.0",
"version": "0.9.8",
"_release": "0.9.8",
"_resolution": {
"type": "version",
"tag": "v0.9.0",
"commit": "45df861eb65f98a00b6c4f2ed4f6a9f37bd20265"
"tag": "v0.9.8",
"commit": "beabb2793ab67da84cadc0b91d5fd509f2cdfc55"
},
"_source": "git://github.com/gionkunz/chartist-js.git",
"_source": "https://github.com/gionkunz/chartist-js.git",
"_target": "~0.9.0",
"_originalSource": "chartist"
}

View File

@ -1,3 +1,66 @@
v0.9.8 - 22 Jun 2016
--------------------
- Added monotone cubic interpolation which is now the default interpolation for line charts <James Watmuff>
- Update zoom plugin to 0.2.1 <hansmaad>
- Bugfix: Prevent infinite loop in getBounds if bounds.valueRange is very small, fixes #643 <hansmaad>
- Bugfix: Correct update events during media changes <Rory Hunter>
- Bugfix: prevent negative value for foreignObject width attribute <Jose Ignacio>
- Fixed example line chart in getting started documentation <Robin Edbom>
- Updated development pipeline dependencies <Gion Kunz>
- Updated chartist tooltip plugin and example styles <Gion Kunz>
- Fixed WTFPL License issue <Gion Kunz>
v0.9.7 - 23 Feb 2016
--------------------
- Fixed bug with label and grid rendering on axis, fixes #621
v0.9.6 - 22 Feb 2016
--------------------
- Added dual licensing WTFPL and MIT, built new version <Gion Kunz>
- Adding unminified CSS to dist output, fixes #506 <Gion Kunz>
- Refactored namespaced attribute handling, fixes #584 <Gion Kunz>
- Allow charts to be created without data and labels, fixes #598, fixes #588, fixes #537, fixes #425 <Gion Kunz> <Carlos Morales>
- Removed onlyInteger setting from default bar chart settings, fixes #423 <Gion Kunz>
- Removed serialization of values on line chart areas, fixes #424 <Gion Kunz>
- Removed workaround and fallback for SVG element width and height calculations, fixes #592 <Gion Kunz>
- Render 0 in ct:value attribute for line graphs <Paul Salaets>
- Allow empty pie chart values to be ignored <Stephen>
- Fix #527 Pie render issue with small angles. <hansmaad>
- Small fix for stacked bars with 'holes' in the data <medzes>
v0.9.5 - 14 Nov 2015
--------------------
- Added 'fillHoles' option for line graphs, which continues the line smoothly through data holes (Thanks to Joshua Warner !)
- Added option to use relative donut width values (Thanks to hansmaad !)
- Added stackMode for bar charts to create overlapping charts or bipolar stacked charts (Thanks to Douglas Mak !)
- Fixed issue with unordered ticks in fixed scale axis, fixes #411 (Thanks Carlos !)
- Fixed left navigation in examples was not using valid anchors, fixes #514 (Thanks Carlos !)
- Internal refactoring and cleanup (Thanks to hansmaad !)
v0.9.4 - 06 Aug 2015
--------------------
- Added axes to all events where they are available in context to provide better API convenience when developing plugins
- Consider additional parameters of SVG elem when called with DOM node
v0.9.3 - 05 Aug 2015
--------------------
- Added better check for undefined values in bar chart, fixes #400
- Fixed issue with SVG feature check within Svg module (Thanks to Markus Gruber !)
v0.9.2 - 02 Aug 2015
--------------------
- Enabled bar charts to use dynamic axes fixes #363, fixes #355
- Added axis title plugin to plugins page (Thanks to @alexstanbury !)
- Added a label group for Pie charts to prevent occlusion by slices (Thanks to Anthony Jimenez!)
- Added better handling for multi values when writing custom attributes, fixes #379
v0.9.1 - 24 Jun 2015
--------------------
- Fixed bug with areaBase narrowing process in area charts, fixes #364
- Fixed bug on bar chart where wrong offset was used (axis offset), fixes #347 (Thanks to @amsardesai !)
- Fixed bug with namespace attributes that caused duplication of SVG element on updates in old browsers (Thanks to @radist2s !)
v0.9.0 - 10 Jun 2015
--------------------
- Major refactoring of axis and projection code, added possibility to configure axes when creating a chart

View File

@ -1,13 +0,0 @@
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.

7
bower_components/chartist/LICENSE-MIT vendored Normal file
View File

@ -0,0 +1,7 @@
Copyright (c) 2013 Gion Kunz <gion.kunz@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -1,4 +1,6 @@
# Big welcome by the Chartist Guy
[![Join the chat at https://gitter.im/gionkunz/chartist-js](https://badges.gitter.im/gionkunz/chartist-js.svg)](https://gitter.im/gionkunz/chartist-js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![npm version](http://img.shields.io/npm/v/chartist.svg)](https://npmjs.org/package/chartist) [![build status](http://img.shields.io/travis/gionkunz/chartist-js.svg)](https://travis-ci.org/gionkunz/chartist-js) [![Inline docs](http://inch-ci.org/github/gionkunz/chartist-js.svg?branch=develop)](http://inch-ci.org/github/gionkunz/chartist-js)
![The Chartist Guy](https://raw.github.com/gionkunz/chartist-js/develop/site/images/chartist-guy.gif "The Chartist Guy")
@ -55,6 +57,20 @@ to the masses.
5. Richer Sass / CSS framework
6. Other charts types (spider etc.)
## Plugins
Some features aren't right for the core product
but there is a great set of plugins available
which add features like:
* [Axis labels](http://gionkunz.github.io/chartist-js/plugins.html#axis-title-plugin)
* [Tooltips at data points](https://gionkunz.github.io/chartist-js/plugins.html#tooltip-plugin)
* [Coloring above/below a threshold](https://gionkunz.github.io/chartist-js/plugins.html#threshold-plugin)
and more.
See all the plugins [here](https://gionkunz.github.io/chartist-js/plugins.html).
## Contribution
We are looking for people who share the idea of having a simple, flexible charting library that is responsive and uses

View File

@ -1,6 +1,5 @@
{
"name": "chartist",
"version": "0.9.0",
"main": [
"./dist/chartist.min.js",
"./dist/chartist.min.css"
@ -12,10 +11,13 @@
"compass-mixins": "~1.0.2",
"codemirror": "~4.12.0",
"base64": "~0.3.0",
"chartist-plugin-pointlabels": "~0.0.3",
"chartist-plugin-sketchy": "~0.0.2",
"chartist-plugin-pointlabels": "~0.0.4",
"chartist-plugin-accessibility": "~0.0.2",
"chartist-plugin-tooltip": "~0.0.8",
"chartist-plugin-tooltip": "~0.0.12",
"chartist-plugin-axistitle": "~0.0.1",
"chartist-plugin-threshold": "~0.0.1",
"chartist-plugin-fill-donut": "~0.0.1",
"chartist-plugin-zoom": "~0.2.1",
"matchMedia": "~0.2.0"
},
"ignore": [
@ -30,6 +32,6 @@
"test"
],
"resolutions": {
"chartist": "~0.8.0"
"chartist": "~0.9.0"
}
}

View File

@ -1,13 +0,0 @@
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.

View File

@ -0,0 +1,608 @@
.ct-label {
fill: rgba(0, 0, 0, 0.4);
color: rgba(0, 0, 0, 0.4);
font-size: 0.75rem;
line-height: 1; }
.ct-chart-line .ct-label,
.ct-chart-bar .ct-label {
display: block;
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex; }
.ct-label.ct-horizontal.ct-start {
-webkit-box-align: flex-end;
-webkit-align-items: flex-end;
-ms-flex-align: flex-end;
align-items: flex-end;
-webkit-box-pack: flex-start;
-webkit-justify-content: flex-start;
-ms-flex-pack: flex-start;
justify-content: flex-start;
text-align: left;
text-anchor: start; }
.ct-label.ct-horizontal.ct-end {
-webkit-box-align: flex-start;
-webkit-align-items: flex-start;
-ms-flex-align: flex-start;
align-items: flex-start;
-webkit-box-pack: flex-start;
-webkit-justify-content: flex-start;
-ms-flex-pack: flex-start;
justify-content: flex-start;
text-align: left;
text-anchor: start; }
.ct-label.ct-vertical.ct-start {
-webkit-box-align: flex-end;
-webkit-align-items: flex-end;
-ms-flex-align: flex-end;
align-items: flex-end;
-webkit-box-pack: flex-end;
-webkit-justify-content: flex-end;
-ms-flex-pack: flex-end;
justify-content: flex-end;
text-align: right;
text-anchor: end; }
.ct-label.ct-vertical.ct-end {
-webkit-box-align: flex-end;
-webkit-align-items: flex-end;
-ms-flex-align: flex-end;
align-items: flex-end;
-webkit-box-pack: flex-start;
-webkit-justify-content: flex-start;
-ms-flex-pack: flex-start;
justify-content: flex-start;
text-align: left;
text-anchor: start; }
.ct-chart-bar .ct-label.ct-horizontal.ct-start {
-webkit-box-align: flex-end;
-webkit-align-items: flex-end;
-ms-flex-align: flex-end;
align-items: flex-end;
-webkit-box-pack: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
text-align: center;
text-anchor: start; }
.ct-chart-bar .ct-label.ct-horizontal.ct-end {
-webkit-box-align: flex-start;
-webkit-align-items: flex-start;
-ms-flex-align: flex-start;
align-items: flex-start;
-webkit-box-pack: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
text-align: center;
text-anchor: start; }
.ct-chart-bar.ct-horizontal-bars .ct-label.ct-horizontal.ct-start {
-webkit-box-align: flex-end;
-webkit-align-items: flex-end;
-ms-flex-align: flex-end;
align-items: flex-end;
-webkit-box-pack: flex-start;
-webkit-justify-content: flex-start;
-ms-flex-pack: flex-start;
justify-content: flex-start;
text-align: left;
text-anchor: start; }
.ct-chart-bar.ct-horizontal-bars .ct-label.ct-horizontal.ct-end {
-webkit-box-align: flex-start;
-webkit-align-items: flex-start;
-ms-flex-align: flex-start;
align-items: flex-start;
-webkit-box-pack: flex-start;
-webkit-justify-content: flex-start;
-ms-flex-pack: flex-start;
justify-content: flex-start;
text-align: left;
text-anchor: start; }
.ct-chart-bar.ct-horizontal-bars .ct-label.ct-vertical.ct-start {
-webkit-box-align: center;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: flex-end;
-webkit-justify-content: flex-end;
-ms-flex-pack: flex-end;
justify-content: flex-end;
text-align: right;
text-anchor: end; }
.ct-chart-bar.ct-horizontal-bars .ct-label.ct-vertical.ct-end {
-webkit-box-align: center;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: flex-start;
-webkit-justify-content: flex-start;
-ms-flex-pack: flex-start;
justify-content: flex-start;
text-align: left;
text-anchor: end; }
.ct-grid {
stroke: rgba(0, 0, 0, 0.2);
stroke-width: 1px;
stroke-dasharray: 2px; }
.ct-point {
stroke-width: 10px;
stroke-linecap: round; }
.ct-line {
fill: none;
stroke-width: 4px; }
.ct-area {
stroke: none;
fill-opacity: 0.1; }
.ct-bar {
fill: none;
stroke-width: 10px; }
.ct-slice-donut {
fill: none;
stroke-width: 60px; }
.ct-series-a .ct-point, .ct-series-a .ct-line, .ct-series-a .ct-bar, .ct-series-a .ct-slice-donut {
stroke: #d70206; }
.ct-series-a .ct-slice-pie, .ct-series-a .ct-area {
fill: #d70206; }
.ct-series-b .ct-point, .ct-series-b .ct-line, .ct-series-b .ct-bar, .ct-series-b .ct-slice-donut {
stroke: #f05b4f; }
.ct-series-b .ct-slice-pie, .ct-series-b .ct-area {
fill: #f05b4f; }
.ct-series-c .ct-point, .ct-series-c .ct-line, .ct-series-c .ct-bar, .ct-series-c .ct-slice-donut {
stroke: #f4c63d; }
.ct-series-c .ct-slice-pie, .ct-series-c .ct-area {
fill: #f4c63d; }
.ct-series-d .ct-point, .ct-series-d .ct-line, .ct-series-d .ct-bar, .ct-series-d .ct-slice-donut {
stroke: #d17905; }
.ct-series-d .ct-slice-pie, .ct-series-d .ct-area {
fill: #d17905; }
.ct-series-e .ct-point, .ct-series-e .ct-line, .ct-series-e .ct-bar, .ct-series-e .ct-slice-donut {
stroke: #453d3f; }
.ct-series-e .ct-slice-pie, .ct-series-e .ct-area {
fill: #453d3f; }
.ct-series-f .ct-point, .ct-series-f .ct-line, .ct-series-f .ct-bar, .ct-series-f .ct-slice-donut {
stroke: #59922b; }
.ct-series-f .ct-slice-pie, .ct-series-f .ct-area {
fill: #59922b; }
.ct-series-g .ct-point, .ct-series-g .ct-line, .ct-series-g .ct-bar, .ct-series-g .ct-slice-donut {
stroke: #0544d3; }
.ct-series-g .ct-slice-pie, .ct-series-g .ct-area {
fill: #0544d3; }
.ct-series-h .ct-point, .ct-series-h .ct-line, .ct-series-h .ct-bar, .ct-series-h .ct-slice-donut {
stroke: #6b0392; }
.ct-series-h .ct-slice-pie, .ct-series-h .ct-area {
fill: #6b0392; }
.ct-series-i .ct-point, .ct-series-i .ct-line, .ct-series-i .ct-bar, .ct-series-i .ct-slice-donut {
stroke: #f05b4f; }
.ct-series-i .ct-slice-pie, .ct-series-i .ct-area {
fill: #f05b4f; }
.ct-series-j .ct-point, .ct-series-j .ct-line, .ct-series-j .ct-bar, .ct-series-j .ct-slice-donut {
stroke: #dda458; }
.ct-series-j .ct-slice-pie, .ct-series-j .ct-area {
fill: #dda458; }
.ct-series-k .ct-point, .ct-series-k .ct-line, .ct-series-k .ct-bar, .ct-series-k .ct-slice-donut {
stroke: #eacf7d; }
.ct-series-k .ct-slice-pie, .ct-series-k .ct-area {
fill: #eacf7d; }
.ct-series-l .ct-point, .ct-series-l .ct-line, .ct-series-l .ct-bar, .ct-series-l .ct-slice-donut {
stroke: #86797d; }
.ct-series-l .ct-slice-pie, .ct-series-l .ct-area {
fill: #86797d; }
.ct-series-m .ct-point, .ct-series-m .ct-line, .ct-series-m .ct-bar, .ct-series-m .ct-slice-donut {
stroke: #b2c326; }
.ct-series-m .ct-slice-pie, .ct-series-m .ct-area {
fill: #b2c326; }
.ct-series-n .ct-point, .ct-series-n .ct-line, .ct-series-n .ct-bar, .ct-series-n .ct-slice-donut {
stroke: #6188e2; }
.ct-series-n .ct-slice-pie, .ct-series-n .ct-area {
fill: #6188e2; }
.ct-series-o .ct-point, .ct-series-o .ct-line, .ct-series-o .ct-bar, .ct-series-o .ct-slice-donut {
stroke: #a748ca; }
.ct-series-o .ct-slice-pie, .ct-series-o .ct-area {
fill: #a748ca; }
.ct-square {
display: block;
position: relative;
width: 100%; }
.ct-square:before {
display: block;
float: left;
content: "";
width: 0;
height: 0;
padding-bottom: 100%; }
.ct-square:after {
content: "";
display: table;
clear: both; }
.ct-square > svg {
display: block;
position: absolute;
top: 0;
left: 0; }
.ct-minor-second {
display: block;
position: relative;
width: 100%; }
.ct-minor-second:before {
display: block;
float: left;
content: "";
width: 0;
height: 0;
padding-bottom: 93.75%; }
.ct-minor-second:after {
content: "";
display: table;
clear: both; }
.ct-minor-second > svg {
display: block;
position: absolute;
top: 0;
left: 0; }
.ct-major-second {
display: block;
position: relative;
width: 100%; }
.ct-major-second:before {
display: block;
float: left;
content: "";
width: 0;
height: 0;
padding-bottom: 88.8888888889%; }
.ct-major-second:after {
content: "";
display: table;
clear: both; }
.ct-major-second > svg {
display: block;
position: absolute;
top: 0;
left: 0; }
.ct-minor-third {
display: block;
position: relative;
width: 100%; }
.ct-minor-third:before {
display: block;
float: left;
content: "";
width: 0;
height: 0;
padding-bottom: 83.3333333333%; }
.ct-minor-third:after {
content: "";
display: table;
clear: both; }
.ct-minor-third > svg {
display: block;
position: absolute;
top: 0;
left: 0; }
.ct-major-third {
display: block;
position: relative;
width: 100%; }
.ct-major-third:before {
display: block;
float: left;
content: "";
width: 0;
height: 0;
padding-bottom: 80%; }
.ct-major-third:after {
content: "";
display: table;
clear: both; }
.ct-major-third > svg {
display: block;
position: absolute;
top: 0;
left: 0; }
.ct-perfect-fourth {
display: block;
position: relative;
width: 100%; }
.ct-perfect-fourth:before {
display: block;
float: left;
content: "";
width: 0;
height: 0;
padding-bottom: 75%; }
.ct-perfect-fourth:after {
content: "";
display: table;
clear: both; }
.ct-perfect-fourth > svg {
display: block;
position: absolute;
top: 0;
left: 0; }
.ct-perfect-fifth {
display: block;
position: relative;
width: 100%; }
.ct-perfect-fifth:before {
display: block;
float: left;
content: "";
width: 0;
height: 0;
padding-bottom: 66.6666666667%; }
.ct-perfect-fifth:after {
content: "";
display: table;
clear: both; }
.ct-perfect-fifth > svg {
display: block;
position: absolute;
top: 0;
left: 0; }
.ct-minor-sixth {
display: block;
position: relative;
width: 100%; }
.ct-minor-sixth:before {
display: block;
float: left;
content: "";
width: 0;
height: 0;
padding-bottom: 62.5%; }
.ct-minor-sixth:after {
content: "";
display: table;
clear: both; }
.ct-minor-sixth > svg {
display: block;
position: absolute;
top: 0;
left: 0; }
.ct-golden-section {
display: block;
position: relative;
width: 100%; }
.ct-golden-section:before {
display: block;
float: left;
content: "";
width: 0;
height: 0;
padding-bottom: 61.804697157%; }
.ct-golden-section:after {
content: "";
display: table;
clear: both; }
.ct-golden-section > svg {
display: block;
position: absolute;
top: 0;
left: 0; }
.ct-major-sixth {
display: block;
position: relative;
width: 100%; }
.ct-major-sixth:before {
display: block;
float: left;
content: "";
width: 0;
height: 0;
padding-bottom: 60%; }
.ct-major-sixth:after {
content: "";
display: table;
clear: both; }
.ct-major-sixth > svg {
display: block;
position: absolute;
top: 0;
left: 0; }
.ct-minor-seventh {
display: block;
position: relative;
width: 100%; }
.ct-minor-seventh:before {
display: block;
float: left;
content: "";
width: 0;
height: 0;
padding-bottom: 56.25%; }
.ct-minor-seventh:after {
content: "";
display: table;
clear: both; }
.ct-minor-seventh > svg {
display: block;
position: absolute;
top: 0;
left: 0; }
.ct-major-seventh {
display: block;
position: relative;
width: 100%; }
.ct-major-seventh:before {
display: block;
float: left;
content: "";
width: 0;
height: 0;
padding-bottom: 53.3333333333%; }
.ct-major-seventh:after {
content: "";
display: table;
clear: both; }
.ct-major-seventh > svg {
display: block;
position: absolute;
top: 0;
left: 0; }
.ct-octave {
display: block;
position: relative;
width: 100%; }
.ct-octave:before {
display: block;
float: left;
content: "";
width: 0;
height: 0;
padding-bottom: 50%; }
.ct-octave:after {
content: "";
display: table;
clear: both; }
.ct-octave > svg {
display: block;
position: absolute;
top: 0;
left: 0; }
.ct-major-tenth {
display: block;
position: relative;
width: 100%; }
.ct-major-tenth:before {
display: block;
float: left;
content: "";
width: 0;
height: 0;
padding-bottom: 40%; }
.ct-major-tenth:after {
content: "";
display: table;
clear: both; }
.ct-major-tenth > svg {
display: block;
position: absolute;
top: 0;
left: 0; }
.ct-major-eleventh {
display: block;
position: relative;
width: 100%; }
.ct-major-eleventh:before {
display: block;
float: left;
content: "";
width: 0;
height: 0;
padding-bottom: 37.5%; }
.ct-major-eleventh:after {
content: "";
display: table;
clear: both; }
.ct-major-eleventh > svg {
display: block;
position: absolute;
top: 0;
left: 0; }
.ct-major-twelfth {
display: block;
position: relative;
width: 100%; }
.ct-major-twelfth:before {
display: block;
float: left;
content: "";
width: 0;
height: 0;
padding-bottom: 33.3333333333%; }
.ct-major-twelfth:after {
content: "";
display: table;
clear: both; }
.ct-major-twelfth > svg {
display: block;
position: absolute;
top: 0;
left: 0; }
.ct-double-octave {
display: block;
position: relative;
width: 100%; }
.ct-double-octave:before {
display: block;
float: left;
content: "";
width: 0;
height: 0;
padding-bottom: 25%; }
.ct-double-octave:after {
content: "";
display: table;
clear: both; }
.ct-double-octave > svg {
display: block;
position: absolute;
top: 0;
left: 0; }
/*# sourceMappingURL=chartist.css.map */

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -16,14 +16,14 @@
"index.html",
"package.json"
],
"homepage": "https://github.com/marijnh/CodeMirror",
"homepage": "https://github.com/components/codemirror",
"_release": "4.12.0",
"_resolution": {
"type": "version",
"tag": "4.12.0",
"commit": "bed3de39aa62616393db2bab4b5fec6ee2238747"
},
"_source": "git://github.com/marijnh/CodeMirror.git",
"_source": "https://github.com/components/codemirror.git",
"_target": "~4.12.0",
"_originalSource": "codemirror"
}

View File

@ -28,7 +28,7 @@
"tag": "1.0.2",
"commit": "10d288e9c9bb9574f833737d4a6315797262e9c0"
},
"_source": "git://github.com/Igosuki/compass-mixins.git",
"_source": "https://github.com/Igosuki/compass-mixins.git",
"_target": "~1.0.2",
"_originalSource": "compass-mixins"
}

View File

@ -17,7 +17,7 @@
"tag": "v1.0.6",
"commit": "2ac7258407619398005ca720596f0d36ce66a6c8"
},
"_source": "git://github.com/ftlabs/fastclick.git",
"_source": "https://github.com/ftlabs/fastclick.git",
"_target": ">=0.6.11",
"_originalSource": "fastclick"
}

View File

@ -1,15 +1,13 @@
{
"name": "foundation",
"version": "5.5.2",
"main": [
"css/foundation.css",
"css/foundation.css.map",
"scss/foundation.scss",
"js/foundation.js"
],
"ignore": [],
"dependencies": {
"jquery": ">= 2.1.0",
"modernizr": ">= 2.7.2",
"modernizr": "2.8.3",
"fastclick": ">=0.6.11",
"jquery.cookie": "~1.4.0",
"jquery-placeholder": "~2.0.7"
@ -20,13 +18,14 @@
},
"private": true,
"homepage": "https://github.com/zurb/bower-foundation",
"_release": "5.5.2",
"version": "5.5.3",
"_release": "5.5.3",
"_resolution": {
"type": "version",
"tag": "5.5.2",
"commit": "9bad0646cb1c41d230e79ffe381491b7f703fc52"
"tag": "5.5.3",
"commit": "b879716aa268e1f88fe43de98db2db4487af00ca"
},
"_source": "git://github.com/zurb/bower-foundation.git",
"_source": "https://github.com/zurb/bower-foundation.git",
"_target": "~5.5.1",
"_originalSource": "foundation"
}

View File

@ -1,5 +1,6 @@
Copyright 2014 jQuery Foundation and other contributors
http://jquery.com/
Copyright (c) 2013-2015 ZURB, inc.
MIT License
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the

46
bower_components/foundation/README.md vendored Normal file
View File

@ -0,0 +1,46 @@
# [Foundation](http://foundation.zurb.com)
[![Build Status](https://travis-ci.org/zurb/foundation.svg)](https://travis-ci.org/zurb/foundation)
Foundation is the most advanced responsive front-end framework in the world. You can quickly prototype and build sites or apps that work on any kind of device with Foundation, which includes layout constructs (like a fully responsive grid), elements and best practices.
To get started, check out <http://foundation.zurb.com/docs>
## Quickstart
To get going with Foundation you can:
* [Download the latest release](http://foundation.zurb.com/develop/download.html)
* [Install with Bower](http://bower.io): `bower install foundation`
* [Install with npm](http://npmjs.com): `npm install foundation-sites`
## Documentation
Foundation uses [Assemble.io](http://assemble.io) and [Grunt](http://gruntjs.com/) to generate its [documentation pages](http://foundation.zurb.com/docs). Documentation can also be run from your local computer:
### View documentation locally
You'll want to clone the Foundation repo first and install all the dependencies. You can do this using the following commands:
```
git clone git@github.com:zurb/foundation.git
cd foundation
npm install -g grunt-cli bower
npm install
bower install
bundle install
```
Then just run `grunt build` and the documentation will be compiled:
```
foundation/
├── dist/
│ └── ...
├────── docs/
│ └── ...
```
Copyright (c) 2015 ZURB, inc.

View File

@ -1,16 +1,14 @@
{
"name": "foundation",
"version": "5.5.2",
"main": [
"css/foundation.css",
"css/foundation.css.map",
"scss/foundation.scss",
"js/foundation.js"
],
"ignore": [
],
"dependencies": {
"jquery": ">= 2.1.0",
"modernizr": ">= 2.7.2",
"modernizr": "2.8.3",
"fastclick": ">=0.6.11",
"jquery.cookie": "~1.4.0",
"jquery-placeholder": "~2.0.7"

View File

@ -1,5 +1,5 @@
meta.foundation-version {
font-family: "/5.5.2/"; }
font-family: "/5.5.3/"; }
meta.foundation-mq-small {
font-family: "/only screen/";
@ -43,15 +43,12 @@ meta.foundation-data-attribute-namespace {
html, body {
height: 100%; }
html {
box-sizing: border-box; }
*,
*:before,
*:after {
-webkit-box-sizing: inherit;
-moz-box-sizing: inherit;
box-sizing: inherit; }
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box; }
html,
body {
@ -1148,7 +1145,8 @@ select {
right: 91.66667%;
left: auto; } }
.accordion {
margin-bottom: 0; }
margin-bottom: 0;
margin-left: 0; }
.accordion:before, .accordion:after {
content: " ";
display: table; }
@ -1158,7 +1156,8 @@ select {
display: block;
margin-bottom: 0 !important; }
.accordion .accordion-navigation.active > a, .accordion dd.active > a {
background: #e8e8e8; }
background: #e8e8e8;
color: #222222; }
.accordion .accordion-navigation > a, .accordion dd > a {
background: #EFEFEF;
color: #222222;
@ -1659,8 +1658,12 @@ button, .button {
padding: 0.625rem 1.25rem 0.6875rem 1.25rem;
font-size: 0.6875rem; }
button.expand, .button.expand {
padding-left: 0;
padding-right: 0;
padding: 1rem 2rem 1.0625rem 2rem;
font-size: 1rem;
padding-bottom: 1.0625rem;
padding-top: 1rem;
padding-left: 1rem;
padding-right: 1rem;
width: 100%; }
button.left-align, .button.left-align {
text-align: left;
@ -1882,7 +1885,8 @@ button::-moz-focus-inner {
@media only screen and (max-width: 40em) {
.button-group.stack-for-small > li {
display: block;
margin: 0; }
margin: 0;
width: 100%; }
.button-group.stack-for-small > li > button, .button-group.stack-for-small > li .button {
border-left: 1px solid;
border-color: rgba(255, 255, 255, 0.5); }
@ -2515,8 +2519,6 @@ button::-moz-focus-inner {
margin: 0; }
.f-dropdown li:hover, .f-dropdown li:focus {
background: #EEEEEE; }
.f-dropdown li.radius {
border-radius: 3px; }
.f-dropdown li a {
display: block;
padding: 0.5rem;
@ -2542,6 +2544,8 @@ button::-moz-focus-inner {
margin-top: 0; }
.f-dropdown.content > *:last-child {
margin-bottom: 0; }
.f-dropdown.radius {
border-radius: 3px; }
.f-dropdown.tiny {
max-width: 200px; }
.f-dropdown.small {
@ -2687,7 +2691,12 @@ label {
/* Adjust padding, alignment and radius if pre/post element is a button */
.postfix.button {
border-color: true; }
border: none;
padding-left: 0;
padding-right: 0;
padding-bottom: 0;
padding-top: 0;
text-align: center; }
.prefix.button {
border: none;
@ -2734,11 +2743,12 @@ span.prefix, label.prefix {
span.postfix, label.postfix {
background: #f2f2f2;
border-left: none;
color: #333333;
border-color: #cccccc; }
/* We use this to get basic styling on all basic form elements */
input[type="text"], input[type="password"], input[type="date"], input[type="datetime"], input[type="datetime-local"], input[type="month"], input[type="week"], input[type="email"], input[type="number"], input[type="search"], input[type="tel"], input[type="time"], input[type="url"], input[type="color"], textarea {
input:not([type]), input[type="text"], input[type="password"], input[type="date"], input[type="datetime"], input[type="datetime-local"], input[type="month"], input[type="week"], input[type="email"], input[type="number"], input[type="search"], input[type="tel"], input[type="time"], input[type="url"], input[type="color"], textarea {
-webkit-appearance: none;
-moz-appearance: none;
border-radius: 0;
@ -2763,17 +2773,17 @@ input[type="text"], input[type="password"], input[type="date"], input[type="date
-ms-transition: border-color 0.15s linear, background 0.15s linear;
-o-transition: border-color 0.15s linear, background 0.15s linear;
transition: border-color 0.15s linear, background 0.15s linear; }
input[type="text"]:focus, input[type="password"]:focus, input[type="date"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="month"]:focus, input[type="week"]:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="time"]:focus, input[type="url"]:focus, input[type="color"]:focus, textarea:focus {
input:not([type]):focus, input[type="text"]:focus, input[type="password"]:focus, input[type="date"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="month"]:focus, input[type="week"]:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="time"]:focus, input[type="url"]:focus, input[type="color"]:focus, textarea:focus {
background: #fafafa;
border-color: #999999;
outline: none; }
input[type="text"]:disabled, input[type="password"]:disabled, input[type="date"]:disabled, input[type="datetime"]:disabled, input[type="datetime-local"]:disabled, input[type="month"]:disabled, input[type="week"]:disabled, input[type="email"]:disabled, input[type="number"]:disabled, input[type="search"]:disabled, input[type="tel"]:disabled, input[type="time"]:disabled, input[type="url"]:disabled, input[type="color"]:disabled, textarea:disabled {
input:not([type]):disabled, input[type="text"]:disabled, input[type="password"]:disabled, input[type="date"]:disabled, input[type="datetime"]:disabled, input[type="datetime-local"]:disabled, input[type="month"]:disabled, input[type="week"]:disabled, input[type="email"]:disabled, input[type="number"]:disabled, input[type="search"]:disabled, input[type="tel"]:disabled, input[type="time"]:disabled, input[type="url"]:disabled, input[type="color"]:disabled, textarea:disabled {
background-color: #DDDDDD;
cursor: default; }
input[type="text"][disabled], input[type="text"][readonly], fieldset[disabled] input[type="text"], input[type="password"][disabled], input[type="password"][readonly], fieldset[disabled] input[type="password"], input[type="date"][disabled], input[type="date"][readonly], fieldset[disabled] input[type="date"], input[type="datetime"][disabled], input[type="datetime"][readonly], fieldset[disabled] input[type="datetime"], input[type="datetime-local"][disabled], input[type="datetime-local"][readonly], fieldset[disabled] input[type="datetime-local"], input[type="month"][disabled], input[type="month"][readonly], fieldset[disabled] input[type="month"], input[type="week"][disabled], input[type="week"][readonly], fieldset[disabled] input[type="week"], input[type="email"][disabled], input[type="email"][readonly], fieldset[disabled] input[type="email"], input[type="number"][disabled], input[type="number"][readonly], fieldset[disabled] input[type="number"], input[type="search"][disabled], input[type="search"][readonly], fieldset[disabled] input[type="search"], input[type="tel"][disabled], input[type="tel"][readonly], fieldset[disabled] input[type="tel"], input[type="time"][disabled], input[type="time"][readonly], fieldset[disabled] input[type="time"], input[type="url"][disabled], input[type="url"][readonly], fieldset[disabled] input[type="url"], input[type="color"][disabled], input[type="color"][readonly], fieldset[disabled] input[type="color"], textarea[disabled], textarea[readonly], fieldset[disabled] textarea {
input:not([type])[disabled], input:not([type])[readonly], fieldset[disabled] input:not([type]), input[type="text"][disabled], input[type="text"][readonly], fieldset[disabled] input[type="text"], input[type="password"][disabled], input[type="password"][readonly], fieldset[disabled] input[type="password"], input[type="date"][disabled], input[type="date"][readonly], fieldset[disabled] input[type="date"], input[type="datetime"][disabled], input[type="datetime"][readonly], fieldset[disabled] input[type="datetime"], input[type="datetime-local"][disabled], input[type="datetime-local"][readonly], fieldset[disabled] input[type="datetime-local"], input[type="month"][disabled], input[type="month"][readonly], fieldset[disabled] input[type="month"], input[type="week"][disabled], input[type="week"][readonly], fieldset[disabled] input[type="week"], input[type="email"][disabled], input[type="email"][readonly], fieldset[disabled] input[type="email"], input[type="number"][disabled], input[type="number"][readonly], fieldset[disabled] input[type="number"], input[type="search"][disabled], input[type="search"][readonly], fieldset[disabled] input[type="search"], input[type="tel"][disabled], input[type="tel"][readonly], fieldset[disabled] input[type="tel"], input[type="time"][disabled], input[type="time"][readonly], fieldset[disabled] input[type="time"], input[type="url"][disabled], input[type="url"][readonly], fieldset[disabled] input[type="url"], input[type="color"][disabled], input[type="color"][readonly], fieldset[disabled] input[type="color"], textarea[disabled], textarea[readonly], fieldset[disabled] textarea {
background-color: #DDDDDD;
cursor: default; }
input[type="text"].radius, input[type="password"].radius, input[type="date"].radius, input[type="datetime"].radius, input[type="datetime-local"].radius, input[type="month"].radius, input[type="week"].radius, input[type="email"].radius, input[type="number"].radius, input[type="search"].radius, input[type="tel"].radius, input[type="time"].radius, input[type="url"].radius, input[type="color"].radius, textarea.radius {
input:not([type]).radius, input[type="text"].radius, input[type="password"].radius, input[type="date"].radius, input[type="datetime"].radius, input[type="datetime-local"].radius, input[type="month"].radius, input[type="week"].radius, input[type="email"].radius, input[type="number"].radius, input[type="search"].radius, input[type="tel"].radius, input[type="time"].radius, input[type="url"].radius, input[type="color"].radius, textarea.radius {
border-radius: 3px; }
form .row .prefix-radius.row.collapse input,
@ -2851,18 +2861,18 @@ textarea {
max-width: 100%; }
::-webkit-input-placeholder {
color: #cccccc; }
color: #666666; }
:-moz-placeholder {
/* Firefox 18- */
color: #cccccc; }
color: #666666; }
::-moz-placeholder {
/* Firefox 19+ */
color: #cccccc; }
color: #666666; }
:-ms-input-placeholder {
color: #cccccc; }
color: #666666; }
/* Add height value for select elements to match text input height */
select {
@ -2870,7 +2880,7 @@ select {
-moz-appearance: none !important;
background-color: #FAFAFA;
border-radius: 0;
background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgeD0iMTJweCIgeT0iMHB4IiB3aWR0aD0iMjRweCIgaGVpZ2h0PSIzcHgiIHZpZXdCb3g9IjAgMCA2IDMiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDYgMyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PHBvbHlnb24gcG9pbnRzPSI1Ljk5MiwwIDIuOTkyLDMgLTAuMDA4LDAgIi8+PC9zdmc+);
background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgeD0iMTJweCIgeT0iMHB4IiB3aWR0aD0iMjRweCIgaGVpZ2h0PSIzcHgiIHZpZXdCb3g9IjAgMCA2IDMiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDYgMyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PHBvbHlnb24gcG9pbnRzPSI1Ljk5MiwwIDIuOTkyLDMgLTAuMDA4LDAgIi8+PC9zdmc+");
background-position: 100% center;
background-repeat: no-repeat;
border-style: solid;
@ -2887,7 +2897,7 @@ select {
display: none; }
select.radius {
border-radius: 3px; }
select:hover {
select:focus {
background-color: #f3f3f3;
border-color: #999999; }
select:disabled {
@ -2922,10 +2932,9 @@ fieldset {
margin: 1.125rem 0;
padding: 1.25rem; }
fieldset legend {
background: #FFFFFF;
font-weight: bold;
margin-left: -0.1875rem;
margin: 0;
margin-left: -0.1875rem;
padding: 0 0.1875rem; }
/* Error Handling */
@ -3227,9 +3236,10 @@ label.error {
.inline-list {
list-style: none;
margin-top: 0;
margin-bottom: 1.0625rem;
margin-left: -1.375rem;
margin-right: 0;
margin: 0 auto 1.0625rem auto;
overflow: hidden;
padding: 0; }
.inline-list > li {
@ -3254,7 +3264,7 @@ label.error {
position: absolute;
top: 0;
width: 95%;
z-index: 101;
z-index: 103;
left: 2.5%; }
.lt-ie9 .joyride-tip-guide {
@ -3367,7 +3377,7 @@ label.error {
z-index: 9999; }
/* Styles for screens that are at least 768px; */
@media only screen and (min-width: 40.0625em) {
@media only screen {
.joyride-tip-guide {
width: 300px;
left: inherit; }
@ -3711,7 +3721,8 @@ ul.pagination {
background: #e6e6e6; }
ul.pagination li.unavailable a, ul.pagination li.unavailable button {
cursor: default;
color: #999999; }
color: #999999;
pointer-events: none; }
ul.pagination li.unavailable:hover a, ul.pagination li.unavailable a:focus, ul.pagination li.unavailable:hover button, ul.pagination li.unavailable button:focus {
background: transparent; }
ul.pagination li.current a, ul.pagination li.current button {
@ -3834,19 +3845,45 @@ ul.pagination {
.progress .meter {
background: #008CBA;
display: block;
height: 100%; }
height: 100%;
float: left;
width: 0%; }
.progress .meter.secondary {
background: #e7e7e7;
display: block;
height: 100%;
float: left;
width: 0%; }
.progress .meter.success {
background: #43AC6A;
display: block;
height: 100%;
float: left;
width: 0%; }
.progress .meter.alert {
background: #f04124;
display: block;
height: 100%;
float: left;
width: 0%; }
.progress.secondary .meter {
background: #e7e7e7;
display: block;
height: 100%; }
height: 100%;
float: left;
width: 0%; }
.progress.success .meter {
background: #43AC6A;
display: block;
height: 100%; }
height: 100%;
float: left;
width: 0%; }
.progress.alert .meter {
background: #f04124;
display: block;
height: 100%; }
height: 100%;
float: left;
width: 0%; }
.progress.radius {
border-radius: 3px; }
.progress.radius .meter {
@ -3982,11 +4019,14 @@ ul.pagination {
.reveal-modal {
top: 6.25rem; } }
.reveal-modal.radius {
box-shadow: none;
border-radius: 3px; }
.reveal-modal.round {
box-shadow: none;
border-radius: 1000px; }
.reveal-modal.collapse {
padding: 0; }
padding: 0;
box-shadow: none; }
@media only screen and (min-width: 40.0625em) {
.reveal-modal.tiny {
left: 0;
@ -4391,8 +4431,8 @@ table {
.tabs dd > a:hover,
.tabs .tab-title > a:hover {
background-color: #e1e1e1; }
.tabs dd.active a,
.tabs .tab-title.active a {
.tabs dd.active > a,
.tabs .tab-title.active > a {
background-color: #FFFFFF;
color: #222222; }
.tabs.radius dd:first-child a,
@ -4494,8 +4534,8 @@ table {
z-index: 1006;
left: 50%; }
.tooltip > .nub {
border-color: transparent transparent #333333 transparent;
border: solid 5px;
border-color: transparent transparent #333333 transparent;
display: block;
height: 0;
pointer-events: none;
@ -4522,7 +4562,7 @@ table {
font-size: 0.625rem;
font-weight: normal; }
@media only screen and (min-width: 40.0625em) {
@media only screen {
.tooltip > .nub {
border-color: transparent transparent #333333 transparent;
top: -10px; }
@ -4918,12 +4958,18 @@ meta.foundation-mq-topbar {
height: 1.75rem;
position: relative;
top: 0.53125rem; }
.top-bar .has-form > .button,
.top-bar .has-form > button {
font-size: 0.875rem;
height: 1.75rem;
position: relative;
top: 0.53125rem; }
.top-bar.expanded {
background: #333333; }
.contain-to-grid .top-bar {
margin-bottom: 0;
margin: 0 auto;
margin-bottom: 0;
max-width: 62.5rem; }
.top-bar-section {
@ -5333,13 +5379,6 @@ dl {
ul {
margin-left: 1.1rem; }
ul.no-bullet {
margin-left: 0; }
ul.no-bullet li ul,
ul.no-bullet li ol {
margin-left: 1.25rem;
margin-bottom: 0;
list-style: none; }
/* Unordered Lists */
ul li ul,
@ -5357,8 +5396,6 @@ ul.circle {
ul.disc {
list-style-type: disc;
margin-left: 1.1rem; }
ul.no-bullet {
list-style: none; }
/* Ordered Lists */
ol {
@ -5368,6 +5405,15 @@ ol {
margin-left: 1.25rem;
margin-bottom: 0; }
.no-bullet {
list-style-type: none;
margin-left: 0; }
.no-bullet li ul,
.no-bullet li ol {
margin-left: 1.25rem;
margin-bottom: 0;
list-style: none; }
/* Definition Lists */
dl dt {
margin-bottom: 0.3rem;
@ -5451,12 +5497,68 @@ blockquote p {
h6 {
font-size: 1rem; } }
/*
* Print styles.
*
* Inlined to avoid required HTTP connection: www.phpied.com/delay-loading-your-print-css/
* Credit to Paul Irish and HTML5 Boilerplate (html5boilerplate.com)
*/
@media print {
* {
background: transparent !important;
color: #000000 !important;
/* Black prints faster: h5bp.com/s */
box-shadow: none !important;
text-shadow: none !important; }
a,
a:visited {
text-decoration: underline; }
a[href]:after {
content: " (" attr(href) ")"; }
abbr[title]:after {
content: " (" attr(title) ")"; }
.ir a:after,
a[href^="javascript:"]:after,
a[href^="#"]:after {
content: ""; }
pre,
blockquote {
border: 1px solid #999999;
page-break-inside: avoid; }
thead {
display: table-header-group;
/* h5bp.com/t */ }
tr,
img {
page-break-inside: avoid; }
img {
max-width: 100% !important; }
@page {
margin: 0.34in; }
p,
h2,
h3 {
orphans: 3;
widows: 3; }
h2,
h3 {
page-break-after: avoid; } }
.off-canvas-wrap {
-webkit-backface-visibility: hidden;
position: relative;
width: 100%;
overflow: hidden; }
.off-canvas-wrap.move-right, .off-canvas-wrap.move-left {
.off-canvas-wrap.move-right, .off-canvas-wrap.move-left, .off-canvas-wrap.move-bottom, .off-canvas-wrap.move-top {
min-height: 100%;
-webkit-overflow-scrolling: touch; }
@ -5557,17 +5659,16 @@ blockquote p {
overflow-x: hidden;
overflow-y: auto;
position: absolute;
top: 0;
transition: transform 500ms ease 0s;
width: 15.625rem;
z-index: 1001;
-webkit-transform: translate3d(-100%, 0, 0);
-moz-transform: translate3d(-100%, 0, 0);
-ms-transform: translate(-100%, 0);
-ms-transform: translate3d(-100%, 0, 0);
-o-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
left: 0; }
left: 0;
top: 0; }
.left-off-canvas-menu * {
-webkit-backface-visibility: hidden; }
@ -5581,20 +5682,67 @@ blockquote p {
overflow-x: hidden;
overflow-y: auto;
position: absolute;
top: 0;
transition: transform 500ms ease 0s;
width: 15.625rem;
z-index: 1001;
-webkit-transform: translate3d(100%, 0, 0);
-moz-transform: translate3d(100%, 0, 0);
-ms-transform: translate(100%, 0);
-ms-transform: translate3d(100%, 0, 0);
-o-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0);
right: 0; }
right: 0;
top: 0; }
.right-off-canvas-menu * {
-webkit-backface-visibility: hidden; }
.top-off-canvas-menu {
-webkit-backface-visibility: hidden;
background: #333333;
bottom: 0;
box-sizing: content-box;
-webkit-overflow-scrolling: touch;
-ms-overflow-style: -ms-autohiding-scrollbar;
overflow-x: hidden;
overflow-y: auto;
position: absolute;
transition: transform 500ms ease 0s;
width: 15.625rem;
z-index: 1001;
-webkit-transform: translate3d(0, -100%, 0);
-moz-transform: translate3d(0, -100%, 0);
-ms-transform: translate(0, -100%);
-o-transform: translate3d(0, -100%, 0);
transform: translate3d(0, -100%, 0);
top: 0;
width: 100%;
height: 18.75rem; }
.top-off-canvas-menu * {
-webkit-backface-visibility: hidden; }
.bottom-off-canvas-menu {
-webkit-backface-visibility: hidden;
background: #333333;
bottom: 0;
box-sizing: content-box;
-webkit-overflow-scrolling: touch;
-ms-overflow-style: -ms-autohiding-scrollbar;
overflow-x: hidden;
overflow-y: auto;
position: absolute;
transition: transform 500ms ease 0s;
width: 15.625rem;
z-index: 1001;
-webkit-transform: translate3d(0, 100%, 0);
-moz-transform: translate3d(0, 100%, 0);
-ms-transform: translate(0, 100%);
-o-transform: translate3d(0, 100%, 0);
transform: translate3d(0, 100%, 0);
bottom: 0;
width: 100%;
height: 18.75rem; }
.bottom-off-canvas-menu * {
-webkit-backface-visibility: hidden; }
ul.off-canvas-list {
list-style-type: none;
margin: 0;
@ -5625,7 +5773,6 @@ ul.off-canvas-list {
-webkit-transform: translate3d(15.625rem, 0, 0);
-moz-transform: translate3d(15.625rem, 0, 0);
-ms-transform: translate(15.625rem, 0);
-ms-transform: translate3d(15.625rem, 0, 0);
-o-transform: translate3d(15.625rem, 0, 0);
transform: translate3d(15.625rem, 0, 0); }
.move-right .exit-off-canvas {
@ -5650,7 +5797,6 @@ ul.off-canvas-list {
-webkit-transform: translate3d(-15.625rem, 0, 0);
-moz-transform: translate3d(-15.625rem, 0, 0);
-ms-transform: translate(-15.625rem, 0);
-ms-transform: translate3d(-15.625rem, 0, 0);
-o-transform: translate3d(-15.625rem, 0, 0);
transform: translate3d(-15.625rem, 0, 0); }
.move-left .exit-off-canvas {
@ -5671,7 +5817,56 @@ ul.off-canvas-list {
.move-left .exit-off-canvas:hover {
background: rgba(255, 255, 255, 0.05); } }
.offcanvas-overlap .left-off-canvas-menu, .offcanvas-overlap .right-off-canvas-menu {
.move-top > .inner-wrap {
-webkit-transform: translate3d(0, -18.75rem, 0);
-moz-transform: translate3d(0, -18.75rem, 0);
-ms-transform: translate(0, -18.75rem);
-o-transform: translate3d(0, -18.75rem, 0);
transform: translate3d(0, -18.75rem, 0); }
.move-top .exit-off-canvas {
-webkit-backface-visibility: hidden;
box-shadow: -4px 0 4px rgba(0, 0, 0, 0.5), 4px 0 4px rgba(0, 0, 0, 0.5);
cursor: pointer;
transition: background 300ms ease;
-webkit-tap-highlight-color: transparent;
background: rgba(255, 255, 255, 0.2);
bottom: 0;
display: block;
left: 0;
position: absolute;
right: 0;
top: 0;
z-index: 1002; }
@media only screen and (min-width: 40.0625em) {
.move-top .exit-off-canvas:hover {
background: rgba(255, 255, 255, 0.05); } }
.move-bottom > .inner-wrap {
-webkit-transform: translate3d(0, 18.75rem, 0);
-moz-transform: translate3d(0, 18.75rem, 0);
-ms-transform: translate(0, 18.75rem);
-o-transform: translate3d(0, 18.75rem, 0);
transform: translate3d(0, 18.75rem, 0); }
.move-bottom .exit-off-canvas {
-webkit-backface-visibility: hidden;
box-shadow: -4px 0 4px rgba(0, 0, 0, 0.5), 4px 0 4px rgba(0, 0, 0, 0.5);
cursor: pointer;
transition: background 300ms ease;
-webkit-tap-highlight-color: transparent;
background: rgba(255, 255, 255, 0.2);
bottom: 0;
display: block;
left: 0;
position: absolute;
right: 0;
top: 0;
z-index: 1002; }
@media only screen and (min-width: 40.0625em) {
.move-bottom .exit-off-canvas:hover {
background: rgba(255, 255, 255, 0.05); } }
.offcanvas-overlap .left-off-canvas-menu, .offcanvas-overlap .right-off-canvas-menu,
.offcanvas-overlap .top-off-canvas-menu, .offcanvas-overlap .bottom-off-canvas-menu {
-ms-transform: none;
-webkit-transform: none;
-moz-transform: none;
@ -5746,14 +5941,72 @@ ul.off-canvas-list {
.offcanvas-overlap-right .exit-off-canvas:hover {
background: rgba(255, 255, 255, 0.05); } }
.offcanvas-overlap-top .bottom-off-canvas-menu {
-ms-transform: none;
-webkit-transform: none;
-moz-transform: none;
-o-transform: none;
transform: none;
z-index: 1003; }
.offcanvas-overlap-top .exit-off-canvas {
-webkit-backface-visibility: hidden;
box-shadow: -4px 0 4px rgba(0, 0, 0, 0.5), 4px 0 4px rgba(0, 0, 0, 0.5);
cursor: pointer;
transition: background 300ms ease;
-webkit-tap-highlight-color: transparent;
background: rgba(255, 255, 255, 0.2);
bottom: 0;
display: block;
left: 0;
position: absolute;
right: 0;
top: 0;
z-index: 1002; }
@media only screen and (min-width: 40.0625em) {
.offcanvas-overlap-top .exit-off-canvas:hover {
background: rgba(255, 255, 255, 0.05); } }
.offcanvas-overlap-bottom .top-off-canvas-menu {
-ms-transform: none;
-webkit-transform: none;
-moz-transform: none;
-o-transform: none;
transform: none;
z-index: 1003; }
.offcanvas-overlap-bottom .exit-off-canvas {
-webkit-backface-visibility: hidden;
box-shadow: -4px 0 4px rgba(0, 0, 0, 0.5), 4px 0 4px rgba(0, 0, 0, 0.5);
cursor: pointer;
transition: background 300ms ease;
-webkit-tap-highlight-color: transparent;
background: rgba(255, 255, 255, 0.2);
bottom: 0;
display: block;
left: 0;
position: absolute;
right: 0;
top: 0;
z-index: 1002; }
@media only screen and (min-width: 40.0625em) {
.offcanvas-overlap-bottom .exit-off-canvas:hover {
background: rgba(255, 255, 255, 0.05); } }
.no-csstransforms .left-off-canvas-menu {
left: -15.625rem; }
.no-csstransforms .right-off-canvas-menu {
right: -15.625rem; }
.no-csstransforms .top-off-canvas-menu {
top: -18.75rem; }
.no-csstransforms .bottom-off-canvas-menu {
bottom: -18.75rem; }
.no-csstransforms .move-left > .inner-wrap {
right: 15.625rem; }
.no-csstransforms .move-right > .inner-wrap {
left: 15.625rem; }
.no-csstransforms .move-top > .inner-wrap {
right: 18.75rem; }
.no-csstransforms .move-bottom > .inner-wrap {
left: 18.75rem; }
.left-submenu {
-webkit-backface-visibility: hidden;
@ -5767,11 +6020,11 @@ ul.off-canvas-list {
position: absolute;
top: 0;
width: 15.625rem;
height: 18.75rem;
z-index: 1002;
-webkit-transform: translate3d(-100%, 0, 0);
-moz-transform: translate3d(-100%, 0, 0);
-ms-transform: translate(-100%, 0);
-ms-transform: translate3d(-100%, 0, 0);
-o-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
left: 0;
@ -5803,7 +6056,6 @@ ul.off-canvas-list {
-webkit-transform: translate3d(0%, 0, 0);
-moz-transform: translate3d(0%, 0, 0);
-ms-transform: translate(0%, 0);
-ms-transform: translate3d(0%, 0, 0);
-o-transform: translate3d(0%, 0, 0);
transform: translate3d(0%, 0, 0); }
@ -5819,11 +6071,11 @@ ul.off-canvas-list {
position: absolute;
top: 0;
width: 15.625rem;
height: 18.75rem;
z-index: 1002;
-webkit-transform: translate3d(100%, 0, 0);
-moz-transform: translate3d(100%, 0, 0);
-ms-transform: translate(100%, 0);
-ms-transform: translate3d(100%, 0, 0);
-o-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0);
right: 0;
@ -5855,10 +6107,105 @@ ul.off-canvas-list {
-webkit-transform: translate3d(0%, 0, 0);
-moz-transform: translate3d(0%, 0, 0);
-ms-transform: translate(0%, 0);
-ms-transform: translate3d(0%, 0, 0);
-o-transform: translate3d(0%, 0, 0);
transform: translate3d(0%, 0, 0); }
.top-submenu {
-webkit-backface-visibility: hidden;
-webkit-overflow-scrolling: touch;
background: #333333;
bottom: 0;
box-sizing: content-box;
margin: 0;
overflow-x: hidden;
overflow-y: auto;
position: absolute;
top: 0;
width: 15.625rem;
height: 18.75rem;
z-index: 1002;
-webkit-transform: translate3d(0, -100%, 0);
-moz-transform: translate3d(0, -100%, 0);
-ms-transform: translate(0, -100%);
-o-transform: translate3d(0, -100%, 0);
transform: translate3d(0, -100%, 0);
top: 0;
width: 100%;
-webkit-transition: -webkit-transform 500ms ease;
-moz-transition: -moz-transform 500ms ease;
-ms-transition: -ms-transform 500ms ease;
-o-transition: -o-transform 500ms ease;
transition: transform 500ms ease; }
.top-submenu * {
-webkit-backface-visibility: hidden; }
.top-submenu .back > a {
background: #444;
border-bottom: none;
border-top: 1px solid #5e5e5e;
color: #999999;
font-weight: bold;
padding: 0.3rem 0.9375rem;
text-transform: uppercase;
margin: 0; }
.top-submenu .back > a:hover {
background: #303030;
border-bottom: none;
border-top: 1px solid #5e5e5e; }
.top-submenu.move-bottom, .top-submenu.offcanvas-overlap-bottom, .top-submenu.offcanvas-overlap {
-webkit-transform: translate3d(0, 0%, 0);
-moz-transform: translate3d(0, 0%, 0);
-ms-transform: translate(0, 0%);
-o-transform: translate3d(0, 0%, 0);
transform: translate3d(0, 0%, 0); }
.bottom-submenu {
-webkit-backface-visibility: hidden;
-webkit-overflow-scrolling: touch;
background: #333333;
bottom: 0;
box-sizing: content-box;
margin: 0;
overflow-x: hidden;
overflow-y: auto;
position: absolute;
top: 0;
width: 15.625rem;
height: 18.75rem;
z-index: 1002;
-webkit-transform: translate3d(0, 100%, 0);
-moz-transform: translate3d(0, 100%, 0);
-ms-transform: translate(0, 100%);
-o-transform: translate3d(0, 100%, 0);
transform: translate3d(0, 100%, 0);
bottom: 0;
width: 100%;
-webkit-transition: -webkit-transform 500ms ease;
-moz-transition: -moz-transform 500ms ease;
-ms-transition: -ms-transform 500ms ease;
-o-transition: -o-transform 500ms ease;
transition: transform 500ms ease; }
.bottom-submenu * {
-webkit-backface-visibility: hidden; }
.bottom-submenu .back > a {
background: #444;
border-bottom: none;
border-top: 1px solid #5e5e5e;
color: #999999;
font-weight: bold;
padding: 0.3rem 0.9375rem;
text-transform: uppercase;
margin: 0; }
.bottom-submenu .back > a:hover {
background: #303030;
border-bottom: none;
border-top: 1px solid #5e5e5e; }
.bottom-submenu.move-top, .bottom-submenu.offcanvas-overlap-top, .bottom-submenu.offcanvas-overlap {
-webkit-transform: translate3d(0, 0%, 0);
-moz-transform: translate3d(0, 0%, 0);
-ms-transform: translate(0, 0%);
-o-transform: translate3d(0, 0%, 0);
transform: translate3d(0, 0%, 0); }
.left-off-canvas-menu ul.off-canvas-list li.has-submenu > a:after {
content: "\BB";
margin-left: .5rem;
@ -6199,109 +6546,20 @@ th.hide-for-touch {
overflow: visible;
clip: auto; }
/*
* Print styles.
*
* Inlined to avoid required HTTP connection: www.phpied.com/delay-loading-your-print-css/
* Credit to Paul Irish and HTML5 Boilerplate (html5boilerplate.com)
*/
.print-only {
/* Print visibility */
.print-only,
.show-for-print {
display: none !important; }
@media print {
* {
background: transparent !important;
box-shadow: none !important;
color: #000000 !important;
/* Black prints faster: h5bp.com/s */
text-shadow: none !important; }
.print-only,
.show-for-print {
display: block; }
.hide-for-print {
display: none; }
table.show-for-print {
display: table !important; }
thead.show-for-print {
display: table-header-group !important; }
tbody.show-for-print {
display: table-row-group !important; }
tr.show-for-print {
display: table-row !important; }
td.show-for-print {
display: table-cell !important; }
th.show-for-print {
display: table-cell !important; }
a,
a:visited {
text-decoration: underline; }
a[href]:after {
content: " (" attr(href) ")"; }
abbr[title]:after {
content: " (" attr(title) ")"; }
.ir a:after,
a[href^="javascript:"]:after,
a[href^="#"]:after {
content: ""; }
pre,
blockquote {
border: 1px solid #999999;
page-break-inside: avoid; }
thead {
display: table-header-group;
/* h5bp.com/t */ }
tr,
img {
page-break-inside: avoid; }
img {
max-width: 100% !important; }
@page {
margin: .5cm; }
p,
h2,
h3 {
orphans: 3;
widows: 3; }
h2,
h3 {
page-break-after: avoid; }
.hide-on-print {
display: none !important; }
.print-only {
display: block !important; }
.hide-on-print,
.hide-for-print {
display: none !important; }
.show-for-print {
display: inherit !important; } }
/* Print visibility */
@media print {
.show-for-print {
display: block; }
.hide-for-print {
display: none; }
table.show-for-print {
display: table !important; }
@ -6319,8 +6577,5 @@ th.hide-for-touch {
th.show-for-print {
display: table-cell !important; } }
@media not print {
.show-for-print {
display: none !important; } }
/*# sourceMappingURL=foundation.css.map */

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More