teechart.js 4.0.0 → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -11
- package/package.json +1 -1
- package/dist/Tween.js +0 -13
- package/dist/date.format.js +0 -145
- package/dist/excanvas/canvas.text.js +0 -489
- package/dist/excanvas/excanvas.compiled.js +0 -35
- package/dist/excanvas/excanvas.js +0 -924
- package/dist/excanvas/excanvas_text.js +0 -1416
- package/dist/teechart.js +0 -16
- package/dist/teechart.js.map +0 -1
- package/dist/three.js +0 -990
package/README.md
CHANGED
|
@@ -4,25 +4,34 @@
|
|
|
4
4
|
<img align="right" src="http://www.steema.com/img/logos/teechart_html5.png">
|
|
5
5
|
</a>
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Powerful yet flexible JavaScript charting for designers & developers.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Live demos are available at:
|
|
12
|
-
|
|
13
|
-
- **Online Demos**: https://teechartjs.steema.com
|
|
14
|
-
- **Legacy Demos**: https://www.steema.com/files/private/teechart/html5/es6/demos/
|
|
9
|
+
[](https://www.npmjs.com/package/teechart.js)
|
|
10
|
+
[](https://www.steema.com/licensing/html5)
|
|
15
11
|
|
|
16
12
|
## Documentation
|
|
17
13
|
|
|
18
|
-
|
|
14
|
+
All links point to the latest version of the library.
|
|
15
|
+
|
|
16
|
+
- [Product Page](https://www.steema.com/product/html5)
|
|
17
|
+
- [Getting Started](https://teechartjs.steema.com/getting-started)
|
|
19
18
|
- [API Reference](https://www.steema.com/docs/TeeChartHTML5Reference.htm)
|
|
20
|
-
- [
|
|
19
|
+
- [Demos](https://teechartjs.steema.com/demos)
|
|
20
|
+
- [Legacy Demos](https://www.steema.com/files/public/teechart/html5/latest/demos/index.html)
|
|
21
|
+
- [Release Notes](https://teechartjs.steema.com/release-notes)
|
|
22
|
+
- [Migration Guide](https://teechartjs.steema.com/migration)
|
|
21
23
|
|
|
22
24
|
## History
|
|
23
25
|
|
|
24
|
-
TeeChartJS comes from [TeeChart JavaScript/HTML5](https://www.steema.com/product/html5), a library initially written by [David Berneda](https://github.com/davidberneda)
|
|
25
|
-
Steema Software
|
|
26
|
+
TeeChartJS comes from [TeeChart JavaScript/HTML5](https://www.steema.com/product/html5), a library initially written by [David Berneda](https://github.com/davidberneda) in 2012 and maintained by the team at [Steema Software](https://www.steema.com).
|
|
27
|
+
Steema Software open-sourced the library in March 2018 but still offers [paid support subscriptions](https://www.steema.com/product/html5#pricing).
|
|
28
|
+
|
|
29
|
+
For older demo versions, legacy demos are still available at:
|
|
30
|
+
https://www.steema.com/files/public/teechart/html5/latest/demos/index.html
|
|
31
|
+
|
|
32
|
+
## Contributing
|
|
33
|
+
|
|
34
|
+
Instructions on building and testing TeeChart.js can be found in [HOW_TO_RUN.md](HOW_TO_RUN.md). Before submitting an issue or a pull request, please check the [Issue Tracker](https://www.steema.com/bugs/buglist.cgi?product=HTML5%20JavaScript%20TeeChart&query_format=advanced&resolution=---) first. For support, please contact [Steema Software](https://www.steema.com/support).
|
|
26
35
|
|
|
27
36
|
## License
|
|
28
37
|
|
package/package.json
CHANGED
package/dist/Tween.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// tween.js r5 - http://github.com/sole/tween.js
|
|
2
|
-
var TWEEN=TWEEN||function(){var a,e,c=60,b=false,h=[],i;return{setFPS:function(f){c=f||60},start:function(f){arguments.length!=0&&this.setFPS(f);e=setInterval(this.update,1E3/c)},stop:function(){clearInterval(e)},setAutostart:function(f){(b=f)&&!e&&this.start()},add:function(f){h.push(f);b&&!e&&this.start()},getAll:function(){return h},removeAll:function(){h=[]},remove:function(f){a=h.indexOf(f);a!==-1&&h.splice(a,1)},update:function(f){a=0;i=h.length;for(f=f||Date.now();a<i;)if(h[a].update(f))a++;
|
|
3
|
-
else{h.splice(a,1);i--}i==0&&b==true&&this.stop()}}}();
|
|
4
|
-
TWEEN.Tween=function(a){var e={},c={},b={},h=1E3,i=0,f=null,n=TWEEN.Easing.Linear.EaseNone,k=null,l=null,m=null;this.to=function(d,g){if(g!==null)h=g;for(var j in d)if(a[j]!==null)b[j]=d[j];return this};this.start=function(d){TWEEN.add(this);f=d?d+i:Date.now()+i;for(var g in b)if(a[g]!==null){e[g]=a[g];c[g]=b[g]-a[g]}return this};this.stop=function(){TWEEN.remove(this);return this};this.delay=function(d){i=d;return this};this.easing=function(d){n=d;return this};this.chain=function(d){k=d};this.onUpdate=
|
|
5
|
-
function(d){l=d;return this};this.onComplete=function(d){m=d;return this};this.update=function(d){var g,j;if(d<f)return true;d=(d-f)/h;d=d>1?1:d;j=n(d);for(g in c)a[g]=e[g]+c[g]*j;l!==null&&l.call(a,j);if(d==1){m!==null&&m.call(a);k!==null&&k.start();return false}return true}};TWEEN.Easing={Linear:{},Quadratic:{},Cubic:{},Quartic:{},Quintic:{},Sinusoidal:{},Exponential:{},Circular:{},Elastic:{},Back:{},Bounce:{}};TWEEN.Easing.Linear.EaseNone=function(a){return a};
|
|
6
|
-
TWEEN.Easing.Quadratic.EaseIn=function(a){return a*a};TWEEN.Easing.Quadratic.EaseOut=function(a){return-a*(a-2)};TWEEN.Easing.Quadratic.EaseInOut=function(a){if((a*=2)<1)return 0.5*a*a;return-0.5*(--a*(a-2)-1)};TWEEN.Easing.Cubic.EaseIn=function(a){return a*a*a};TWEEN.Easing.Cubic.EaseOut=function(a){return--a*a*a+1};TWEEN.Easing.Cubic.EaseInOut=function(a){if((a*=2)<1)return 0.5*a*a*a;return 0.5*((a-=2)*a*a+2)};TWEEN.Easing.Quartic.EaseIn=function(a){return a*a*a*a};
|
|
7
|
-
TWEEN.Easing.Quartic.EaseOut=function(a){return-(--a*a*a*a-1)};TWEEN.Easing.Quartic.EaseInOut=function(a){if((a*=2)<1)return 0.5*a*a*a*a;return-0.5*((a-=2)*a*a*a-2)};TWEEN.Easing.Quintic.EaseIn=function(a){return a*a*a*a*a};TWEEN.Easing.Quintic.EaseOut=function(a){return(a-=1)*a*a*a*a+1};TWEEN.Easing.Quintic.EaseInOut=function(a){if((a*=2)<1)return 0.5*a*a*a*a*a;return 0.5*((a-=2)*a*a*a*a+2)};TWEEN.Easing.Sinusoidal.EaseIn=function(a){return-Math.cos(a*Math.PI/2)+1};
|
|
8
|
-
TWEEN.Easing.Sinusoidal.EaseOut=function(a){return Math.sin(a*Math.PI/2)};TWEEN.Easing.Sinusoidal.EaseInOut=function(a){return-0.5*(Math.cos(Math.PI*a)-1)};TWEEN.Easing.Exponential.EaseIn=function(a){return a==0?0:Math.pow(2,10*(a-1))};TWEEN.Easing.Exponential.EaseOut=function(a){return a==1?1:-Math.pow(2,-10*a)+1};TWEEN.Easing.Exponential.EaseInOut=function(a){if(a==0)return 0;if(a==1)return 1;if((a*=2)<1)return 0.5*Math.pow(2,10*(a-1));return 0.5*(-Math.pow(2,-10*(a-1))+2)};
|
|
9
|
-
TWEEN.Easing.Circular.EaseIn=function(a){return-(Math.sqrt(1-a*a)-1)};TWEEN.Easing.Circular.EaseOut=function(a){return Math.sqrt(1- --a*a)};TWEEN.Easing.Circular.EaseInOut=function(a){if((a/=0.5)<1)return-0.5*(Math.sqrt(1-a*a)-1);return 0.5*(Math.sqrt(1-(a-=2)*a)+1)};TWEEN.Easing.Elastic.EaseIn=function(a){var e,c=0.1,b=0.4;if(a==0)return 0;if(a==1)return 1;b||(b=0.3);if(!c||c<1){c=1;e=b/4}else e=b/(2*Math.PI)*Math.asin(1/c);return-(c*Math.pow(2,10*(a-=1))*Math.sin((a-e)*2*Math.PI/b))};
|
|
10
|
-
TWEEN.Easing.Elastic.EaseOut=function(a){var e,c=0.1,b=0.4;if(a==0)return 0;if(a==1)return 1;b||(b=0.3);if(!c||c<1){c=1;e=b/4}else e=b/(2*Math.PI)*Math.asin(1/c);return c*Math.pow(2,-10*a)*Math.sin((a-e)*2*Math.PI/b)+1};
|
|
11
|
-
TWEEN.Easing.Elastic.EaseInOut=function(a){var e,c=0.1,b=0.4;if(a==0)return 0;if(a==1)return 1;b||(b=0.3);if(!c||c<1){c=1;e=b/4}else e=b/(2*Math.PI)*Math.asin(1/c);if((a*=2)<1)return-0.5*c*Math.pow(2,10*(a-=1))*Math.sin((a-e)*2*Math.PI/b);return c*Math.pow(2,-10*(a-=1))*Math.sin((a-e)*2*Math.PI/b)*0.5+1};TWEEN.Easing.Back.EaseIn=function(a){return a*a*(2.70158*a-1.70158)};TWEEN.Easing.Back.EaseOut=function(a){return(a-=1)*a*(2.70158*a+1.70158)+1};
|
|
12
|
-
TWEEN.Easing.Back.EaseInOut=function(a){if((a*=2)<1)return 0.5*a*a*(3.5949095*a-2.5949095);return 0.5*((a-=2)*a*(3.5949095*a+2.5949095)+2)};TWEEN.Easing.Bounce.EaseIn=function(a){return 1-TWEEN.Easing.Bounce.EaseOut(1-a)};TWEEN.Easing.Bounce.EaseOut=function(a){return(a/=1)<1/2.75?7.5625*a*a:a<2/2.75?7.5625*(a-=1.5/2.75)*a+0.75:a<2.5/2.75?7.5625*(a-=2.25/2.75)*a+0.9375:7.5625*(a-=2.625/2.75)*a+0.984375};
|
|
13
|
-
TWEEN.Easing.Bounce.EaseInOut=function(a){if(a<0.5)return TWEEN.Easing.Bounce.EaseIn(a*2)*0.5;return TWEEN.Easing.Bounce.EaseOut(a*2-1)*0.5+0.5};
|
package/dist/date.format.js
DELETED
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Date Format 1.2.3
|
|
3
|
-
* (c) 2007-2009 Steven Levithan <stevenlevithan.com>
|
|
4
|
-
* MIT license
|
|
5
|
-
*
|
|
6
|
-
* Includes enhancements by Scott Trenda <scott.trenda.net>
|
|
7
|
-
* and Kris Kowal <cixar.com/~kris.kowal/>
|
|
8
|
-
*
|
|
9
|
-
* Accepts a date, a mask, or a date and a mask.
|
|
10
|
-
* Returns a formatted version of the given date.
|
|
11
|
-
* The date defaults to the current date/time.
|
|
12
|
-
* The mask defaults to dateFormat.masks.default.
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
/*
|
|
16
|
-
* Additions by Steema Software
|
|
17
|
-
*
|
|
18
|
-
* function Date.msecsRound(min,max)
|
|
19
|
-
* Returns nearest to min logical date in msecs.
|
|
20
|
-
*
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
Date.prototype.msecsRound=function(min,max) {
|
|
24
|
-
var days=Math.round((max-min)/86400000);
|
|
25
|
-
|
|
26
|
-
if (days>60) {
|
|
27
|
-
var d=new Date(min), m=d.getMonth(), y=d.getFullYear();
|
|
28
|
-
if (m<12) m++; else { m=1; y++ }
|
|
29
|
-
return new Date(y,m,1).getTime();
|
|
30
|
-
}
|
|
31
|
-
else
|
|
32
|
-
return min;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
var dateFormat = function () {
|
|
36
|
-
var token = /d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,
|
|
37
|
-
timezone = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,
|
|
38
|
-
timezoneClip = /[^-+\dA-Z]/g,
|
|
39
|
-
pad = function (val, len) {
|
|
40
|
-
val = String(val);
|
|
41
|
-
len = len || 2;
|
|
42
|
-
while (val.length < len) val = "0" + val;
|
|
43
|
-
return val;
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
// Regexes and supporting functions are cached through closure
|
|
47
|
-
return function (date, mask, utc) {
|
|
48
|
-
var dF = dateFormat;
|
|
49
|
-
|
|
50
|
-
// You can't provide utc if you skip other args (use the "UTC:" mask prefix)
|
|
51
|
-
if (arguments.length == 1 && Object.prototype.toString.call(date) == "[object String]" && !/\d/.test(date)) {
|
|
52
|
-
mask = date;
|
|
53
|
-
date = undefined;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// Passing date through Date applies Date.parse, if necessary
|
|
57
|
-
date = date ? new Date(date) : new Date;
|
|
58
|
-
if (isNaN(date)) throw SyntaxError("invalid date");
|
|
59
|
-
|
|
60
|
-
mask = String(dF.masks[mask] || mask || dF.masks["default"]);
|
|
61
|
-
|
|
62
|
-
// Allow setting the utc argument via the mask
|
|
63
|
-
if (mask.slice(0, 4) == "UTC:") {
|
|
64
|
-
mask = mask.slice(4);
|
|
65
|
-
utc = true;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
var _ = utc ? "getUTC" : "get",
|
|
69
|
-
d = date[_ + "Date"](),
|
|
70
|
-
D = date[_ + "Day"](),
|
|
71
|
-
m = date[_ + "Month"](),
|
|
72
|
-
y = date[_ + "FullYear"](),
|
|
73
|
-
H = date[_ + "Hours"](),
|
|
74
|
-
M = date[_ + "Minutes"](),
|
|
75
|
-
s = date[_ + "Seconds"](),
|
|
76
|
-
L = date[_ + "Milliseconds"](),
|
|
77
|
-
o = utc ? 0 : date.getTimezoneOffset(),
|
|
78
|
-
flags = {
|
|
79
|
-
d: d,
|
|
80
|
-
dd: pad(d),
|
|
81
|
-
ddd: dF.i18n.dayNames[D],
|
|
82
|
-
dddd: dF.i18n.dayNames[D + 7],
|
|
83
|
-
m: m + 1,
|
|
84
|
-
mm: pad(m + 1),
|
|
85
|
-
mmm: dF.i18n.monthNames[m],
|
|
86
|
-
mmmm: dF.i18n.monthNames[m + 12],
|
|
87
|
-
yy: String(y).slice(2),
|
|
88
|
-
yyyy: y,
|
|
89
|
-
h: H % 12 || 12,
|
|
90
|
-
hh: pad(H % 12 || 12),
|
|
91
|
-
H: H,
|
|
92
|
-
HH: pad(H),
|
|
93
|
-
M: M,
|
|
94
|
-
MM: pad(M),
|
|
95
|
-
s: s,
|
|
96
|
-
ss: pad(s),
|
|
97
|
-
l: pad(L, 3),
|
|
98
|
-
L: pad(L > 99 ? Math.round(L / 10) : L),
|
|
99
|
-
t: H < 12 ? "a" : "p",
|
|
100
|
-
tt: H < 12 ? "am" : "pm",
|
|
101
|
-
T: H < 12 ? "A" : "P",
|
|
102
|
-
TT: H < 12 ? "AM" : "PM",
|
|
103
|
-
Z: utc ? "UTC" : (String(date).match(timezone) || [""]).pop().replace(timezoneClip, ""),
|
|
104
|
-
o: (o > 0 ? "-" : "+") + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4),
|
|
105
|
-
S: ["th", "st", "nd", "rd"][d % 10 > 3 ? 0 : (d % 100 - d % 10 != 10) * d % 10]
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
return mask.replace(token, function ($0) {
|
|
109
|
-
return $0 in flags ? flags[$0] : $0.slice(1, $0.length - 1);
|
|
110
|
-
});
|
|
111
|
-
};
|
|
112
|
-
}();
|
|
113
|
-
|
|
114
|
-
// Some common format strings
|
|
115
|
-
dateFormat.masks = {
|
|
116
|
-
"default": "ddd mmm dd yyyy HH:MM:ss",
|
|
117
|
-
shortDate: "m/d/yy",
|
|
118
|
-
mediumDate: "mmm d, yyyy",
|
|
119
|
-
longDate: "mmmm d, yyyy",
|
|
120
|
-
fullDate: "dddd, mmmm d, yyyy",
|
|
121
|
-
shortTime: "h:MM TT",
|
|
122
|
-
mediumTime: "h:MM:ss TT",
|
|
123
|
-
longTime: "h:MM:ss TT Z",
|
|
124
|
-
isoDate: "yyyy-mm-dd",
|
|
125
|
-
isoTime: "HH:MM:ss",
|
|
126
|
-
isoDateTime: "yyyy-mm-dd'T'HH:MM:ss",
|
|
127
|
-
isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"
|
|
128
|
-
};
|
|
129
|
-
|
|
130
|
-
// Internationalization strings
|
|
131
|
-
dateFormat.i18n = {
|
|
132
|
-
dayNames: [
|
|
133
|
-
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat",
|
|
134
|
-
"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"
|
|
135
|
-
],
|
|
136
|
-
monthNames: [
|
|
137
|
-
"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec",
|
|
138
|
-
"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
|
|
139
|
-
]
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
// For convenience...
|
|
143
|
-
Date.prototype.format = function (mask, utc) {
|
|
144
|
-
return dateFormat(this, mask, utc);
|
|
145
|
-
};
|