Skip to content

Commit

Permalink
skip: add demo for color.onover
Browse files Browse the repository at this point in the history
  • Loading branch information
netil committed Feb 22, 2019
1 parent aaa8293 commit cd9d7f5
Showing 1 changed file with 44 additions and 19 deletions.
63 changes: 44 additions & 19 deletions demo/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -2425,28 +2425,53 @@ d3.select(".chart_area")
}
}
},
ColorOnover: {
options: {
data: {
columns: [
["data1", 230, 200, 100, 400, 150, 250],
["data2", 150, 320, 210, 240, 115, 125],
["data3", 130, 220, 140, 200, 250, 450]
],
groups: [
["data1", "data2", "data3"]
],
type: "bar"
},
color: {
onover: {
data1: "#868484",
data2: "black",
data3: "rgb(202, 202, 202)"
ColorOnover: [
{
options: {
data: {
columns: [
["data1", 230, 200, 100, 400, 150, 250],
["data2", 150, 320, 210, 240, 115, 125],
["data3", 130, 220, 140, 200, 250, 450]
],
groups: [
["data1", "data2", "data3"]
],
type: "bar"
},
color: {
onover: {
data1: "#868484",
data2: "black",
data3: "rgb(202, 202, 202)"
}
}
}
},
{
options: {
data: {
columns: [
["data1", 241, 737, 78],
["data2", 245, 164, 628],
["data3", 990, 496, 638]
],
types: {
data1: "spline",
data2: "area",
data3: "bar"
}
},
color: {
onover: function(d) {
var pttr = ["red", "yellow", "cyan"];

return pttr[(Math.floor(Math.random() * pttr.length))];
}
}
}
}
},
],
ColorPattern: {
options: {
data: {
Expand Down

0 comments on commit cd9d7f5

Please sign in to comment.