Skip to content

Commit

Permalink
refac: removed reference to window and document as not needed and cau…
Browse files Browse the repository at this point in the history
…sing issues with server-side rendering - fixes #31
  • Loading branch information
alexstanbury committed Dec 18, 2019
1 parent 43ac992 commit 3321428
Show file tree
Hide file tree
Showing 8 changed files with 188 additions and 173 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,8 @@ var chart = new Chartist.Line(

## Example

Install using `npm install` then run/edit the example.html file to see the plugin in action
Install using `npm install` then run/edit the example.html file to see the plugin in action.

## Build

Use `npm run build` to build a minimised version.
2 changes: 1 addition & 1 deletion dist/LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2004 Sam Hocevar <[email protected]>
Copyright (c) 2019 Alex Stanbury

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
22 changes: 12 additions & 10 deletions dist/chartist-plugin-axistitle.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
(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(["chartist"], function(Chartist) {
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(require("chartist"));
} else {
root["Chartist.plugins.ctAxisTitle"] = factory(Chartist);
root['Chartist.plugins.ctAxisTitle'] = factory(Chartist);
}
})(this, function(Chartist) {
}(this, function (Chartist) {

/**
* Chartist.js plugin to display a title for 1 or 2 axes.
* version 0.0.5
* version 0.0.7
* author: alex stanbury
*/
/* global Chartist */
(function(window, document, Chartist) {
(function(Chartist) {
"use strict";

var axisDefaults = {
Expand Down Expand Up @@ -139,7 +140,8 @@
});
};
};
})(window, document, Chartist);
})(Chartist);

return Chartist.plugins.ctAxisTitle;
});

}));
8 changes: 7 additions & 1 deletion dist/chartist-plugin-axistitle.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/chartist-plugin-axistitle.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3321428

Please sign in to comment.