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
e0a0013c
Commit
e0a0013c
authored
Apr 18, 2013
by
Zachary Tong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix clipping issues with bullseye on sphere
parent
9a91a494
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
panels/map2/display/bullseye.js
+4
-6
No files found.
panels/map2/display/bullseye.js
View file @
e0a0013c
...
...
@@ -2,7 +2,7 @@
* Renders bullseyes as geo-json poly gon entities
* Allows for them to clip on spheres correctly
*/
function
displayBullseye
(
scope
,
dr
,
path
)
{
function
displayBullseye
(
scope
,
dr
)
{
var
degrees
=
180
/
Math
.
PI
var
circle
=
d3
.
geo
.
circle
();
...
...
@@ -10,7 +10,7 @@ function displayBullseye(scope, dr, path) {
if
(
scope
.
panel
.
display
.
bullseye
.
enabled
)
{
data
=
[
{
lat
:
parseFloat
(
scope
.
panel
.
display
.
bullseye
.
coord
.
lat
),
lon
:
parseFloat
(
scope
.
panel
.
display
.
bullseye
.
coord
.
lon
)}
circle
.
origin
(
parseFloat
(
scope
.
panel
.
display
.
bullseye
.
coord
.
lat
),
parseFloat
(
scope
.
panel
.
display
.
bullseye
.
coord
.
lon
)).
angle
(
1000
/
6371
*
degrees
)()
];
}
...
...
@@ -18,10 +18,8 @@ function displayBullseye(scope, dr, path) {
.
data
(
data
);
arcs
.
enter
().
append
(
"path"
)
.
datum
(
function
(
d
)
{
return
circle
.
origin
([
d
.
lon
,
d
.
lat
]).
angle
(
1000
/
6371
*
degrees
)();
})
.
attr
(
"d"
,
path
)
.
attr
(
"d"
,
dr
.
path
)
.
attr
(
"class"
,
"arc"
);
arcs
.
exit
().
remove
();
...
...
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