Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
25938054
Commit
25938054
authored
Apr 18, 2013
by
Zachary Tong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move directive-level variables out of scope
parent
5a5e4cef
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
83 deletions
+52
-83
panels/map2/display/binning.js
+4
-4
panels/map2/display/bullseye.js
+2
-2
panels/map2/display/geopoints.js
+3
-3
panels/map2/module.js
+43
-74
No files found.
panels/map2/display/binning.js
View file @
25938054
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
* clip on spheres appropriately. To fix this, we would need to translate
* clip on spheres appropriately. To fix this, we would need to translate
* the svg path into a geo-path
* the svg path into a geo-path
*/
*/
function
displayBinning
(
scope
,
dimensions
)
{
function
displayBinning
(
scope
,
d
r
,
d
imensions
)
{
var
hexbin
=
d3
.
hexbin
()
var
hexbin
=
d3
.
hexbin
()
.
size
(
dimensions
)
.
size
(
dimensions
)
...
@@ -31,12 +31,12 @@ function displayBinning(scope, dimensions) {
...
@@ -31,12 +31,12 @@ function displayBinning(scope, dimensions) {
_
.
map
(
scope
.
data
,
function
(
k
,
v
)
{
_
.
map
(
scope
.
data
,
function
(
k
,
v
)
{
var
decoded
=
geohash
.
decode
(
v
);
var
decoded
=
geohash
.
decode
(
v
);
return
_
.
map
(
_
.
range
(
0
,
k
*
scale
),
function
(
a
,
b
)
{
return
_
.
map
(
_
.
range
(
0
,
k
*
scale
),
function
(
a
,
b
)
{
binPoints
.
push
(
scope
.
projection
([
decoded
.
longitude
,
decoded
.
latitude
]));
binPoints
.
push
(
dr
.
projection
([
decoded
.
longitude
,
decoded
.
latitude
]));
})
})
});
});
}
else
{
}
else
{
binPoints
=
scope
.
projectedPoints
;
binPoints
=
dr
.
projectedPoints
;
}
}
//bin and sort the points, so we can set the various ranges appropriately
//bin and sort the points, so we can set the various ranges appropriately
...
@@ -64,7 +64,7 @@ function displayBinning(scope, dimensions) {
...
@@ -64,7 +64,7 @@ function displayBinning(scope, dimensions) {
.
interpolate
(
d3
.
interpolateLab
);
.
interpolate
(
d3
.
interpolateLab
);
var
hex
=
scope
.
g
.
selectAll
(
".hexagon"
)
var
hex
=
dr
.
g
.
selectAll
(
".hexagon"
)
.
data
(
binnedPoints
);
.
data
(
binnedPoints
);
hex
.
enter
().
append
(
"path"
)
hex
.
enter
().
append
(
"path"
)
...
...
panels/map2/display/bullseye.js
View file @
25938054
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* Renders bullseyes as geo-json poly gon entities
* Renders bullseyes as geo-json poly gon entities
* Allows for them to clip on spheres correctly
* Allows for them to clip on spheres correctly
*/
*/
function
displayBullseye
(
scope
,
path
)
{
function
displayBullseye
(
scope
,
dr
,
path
)
{
var
degrees
=
180
/
Math
.
PI
var
degrees
=
180
/
Math
.
PI
var
circle
=
d3
.
geo
.
circle
();
var
circle
=
d3
.
geo
.
circle
();
...
@@ -14,7 +14,7 @@ function displayBullseye(scope, path) {
...
@@ -14,7 +14,7 @@ function displayBullseye(scope, path) {
];
];
}
}
var
arcs
=
scope
.
g
.
selectAll
(
".arc"
)
var
arcs
=
dr
.
g
.
selectAll
(
".arc"
)
.
data
(
data
);
.
data
(
data
);
arcs
.
enter
().
append
(
"path"
)
arcs
.
enter
().
append
(
"path"
)
...
...
panels/map2/display/geopoints.js
View file @
25938054
...
@@ -2,19 +2,19 @@
...
@@ -2,19 +2,19 @@
* Renders geopoints as geo-json poly gon entities
* Renders geopoints as geo-json poly gon entities
* Allows for them to clip on spheres correctly
* Allows for them to clip on spheres correctly
*/
*/
function
displayGeopoints
(
scope
,
path
)
{
function
displayGeopoints
(
scope
,
dr
,
path
)
{
var
points
=
[];
var
points
=
[];
var
circle
=
d3
.
geo
.
circle
();
var
circle
=
d3
.
geo
.
circle
();
var
degrees
=
180
/
Math
.
PI
var
degrees
=
180
/
Math
.
PI
if
(
scope
.
panel
.
display
.
geopoints
.
enabled
)
{
if
(
scope
.
panel
.
display
.
geopoints
.
enabled
)
{
points
=
scope
.
points
;
points
=
dr
.
points
;
}
}
var
geopoints
=
scope
.
g
.
selectAll
(
".geopoint"
)
var
geopoints
=
dr
.
g
.
selectAll
(
".geopoint"
)
.
data
(
points
);
.
data
(
points
);
geopoints
.
enter
().
append
(
"path"
)
geopoints
.
enter
().
append
(
"path"
)
...
...
panels/map2/module.js
View file @
25938054
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment