Page Menu
Home
Code
Search
Configure Global Search
Log In
Files
F886237
common.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
common.js
View Options
/*
Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
Available via Academic Free License >= 2.1 OR the modified BSD license.
see: http://dojotoolkit.org/license for details
*/
if
(
!
dojo
.
_hasResource
[
"dojox.charting.scaler.common"
]){
dojo
.
_hasResource
[
"dojox.charting.scaler.common"
]
=
true
;
dojo
.
provide
(
"dojox.charting.scaler.common"
);
(
function
(){
var
eq
=
function
(
a
,
b
){
return
Math
.
abs
(
a
-
b
)
<=
0.000001
*
(
Math
.
abs
(
a
)
+
Math
.
abs
(
b
));
};
dojo
.
mixin
(
dojox
.
charting
.
scaler
.
common
,{
findString
:
function
(
_1
,
_2
){
_1
=
_1
.
toLowerCase
();
for
(
var
i
=
0
;
i
<
_2
.
length
;
++
i
){
if
(
_1
==
_2
[
i
]){
return
true
;
}
}
return
false
;
},
getNumericLabel
:
function
(
_3
,
_4
,
_5
){
var
_6
=
_5
.
fixed
?
_3
.
toFixed
(
_4
<
0
?-
_4
:
0
)
:
_3
.
toString
();
if
(
_5
.
labelFunc
){
var
r
=
_5
.
labelFunc
(
_6
,
_3
,
_4
);
if
(
r
){
return
r
;
}
}
if
(
_5
.
labels
){
var
l
=
_5
.
labels
,
lo
=
0
,
hi
=
l
.
length
;
while
(
lo
<
hi
){
var
_7
=
Math
.
floor
((
lo
+
hi
)
/
2
),
_8
=
l
[
_7
].
value
;
if
(
_8
<
_3
){
lo
=
_7
+
1
;
}
else
{
hi
=
_7
;
}
}
if
(
lo
<
l
.
length
&&
eq
(
l
[
lo
].
value
,
_3
)){
return
l
[
lo
].
text
;
}
--
lo
;
if
(
lo
>=
0
&&
lo
<
l
.
length
&&
eq
(
l
[
lo
].
value
,
_3
)){
return
l
[
lo
].
text
;
}
lo
+=
2
;
if
(
lo
<
l
.
length
&&
eq
(
l
[
lo
].
value
,
_3
)){
return
l
[
lo
].
text
;
}
}
return
_6
;
}});
})();
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Apr 6, 23:53 (2 w, 2 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26638
Default Alt Text
common.js (1 KB)
Attached To
rZED Zed
Event Timeline
Log In to Comment