-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This chart extends the basic `Chord` by simply wrapping it and altering its behavior through the exposed API.
- Loading branch information
1 parent
f6994da
commit fb3a460
Showing
3 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,4 +59,7 @@ | |
}); | ||
myCustomChord(matrix); | ||
|
||
var myImprovedChord = ImprovedChord(); | ||
myImprovedChord(matrix); | ||
|
||
}(this)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
window.ImprovedChord = function(options) { | ||
|
||
"use strict"; | ||
var Chord = window.Chord; | ||
|
||
var improvedChord = Chord(options); | ||
improvedChord.colors = ["#000000", "#FFDD89", "#957244", "#F26224"]; | ||
improvedChord.layers.ticks.on("enter", function() { | ||
this.each(function(data, idx, group) { | ||
d3.select(this) | ||
.style("font-weight", "bold") | ||
.attr("fill", improvedChord.colors[group]); | ||
}); | ||
}); | ||
|
||
return improvedChord; | ||
|
||
}; |