Skip to content

Commit

Permalink
Merge branch 'release/v2.0.8'
Browse files Browse the repository at this point in the history
  • Loading branch information
BigFatDog committed Dec 9, 2018
2 parents 4c030e2 + 7022a54 commit 1700d29
Show file tree
Hide file tree
Showing 19 changed files with 249 additions and 397 deletions.
9 changes: 0 additions & 9 deletions demo/area-stacked.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,27 +68,18 @@
// chart.revealVoronoi();
// chart.revealQuadtree();
// })
var opt = chart.options();

// change color
$('#group').click(function(){
// opt.plots.stackLayout = false;
// chart.options(opt);
chart.group();
});

$('#zero').click(function(){
// opt.plots.stackLayout = true;
// opt.plots.stackMethod = 'zero';
// chart.options(opt);
chart.stack();

});

$('#expand').click(function(){
// opt.plots.stackLayout = true;
// opt.plots.stackMethod = 'expand';
// chart.options(opt);
chart.expand();
});

Expand Down
43 changes: 8 additions & 35 deletions demo/area.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,61 +104,34 @@
area.update();
});

var options2 = area.options();

// change color
$('#color1').click(function(){
options2.color.scheme = "BuGn";
area.color(options2.color);
area.color({scheme: 'BuGn'});
});

$('#color2').click(function(){
options2.color.scheme = "Blues";
area.color(options2.color)
area.color({scheme: 'Blues'});
});

$('#color3').click(function(){
options2.color.scheme = "Warm";
area.color(options2.color)
area.color({scheme: 'Warm'});
});

$('#color4').click(function(){
options2.color.scheme = "Cubehelix";
area.color(options2.color);
console.log(area);
area.color({scheme: 'Cubehelix'});
});

$('#a1').click(function(){
options2.ordering = {
accessor: 'date',
direction: 'asc'
}
area.options(options2);
area.update();
area.sort('date', 'asc');
})
$('#a2').click(function(){
options2.ordering = {
accessor: 'date',
direction: 'desc'
}
area.options(options2);
area.update();
area.sort('date', 'desc');
});
$('#a3').click(function(){
options2.ordering = {
accessor: metricAccessor,
direction: 'asc'
}
area.options(options2);
area.update();
area.sort(metricAccessor, 'asc');
});
$('#a4').click(function(){
options2.ordering = {
accessor: metricAccessor,
direction: 'desc'
}
area.options(options2);
area.update();
area.sort(metricAccessor, 'desc');
});

});
Expand Down
39 changes: 4 additions & 35 deletions demo/bar-grouped.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,51 +99,20 @@
});

$('#x-asc').click(function () {
var _opt = chart.options();

_opt.ordering = {
accessor: 'mx',
direction: 'asc'
}

chart.options(_opt);
chart.update();
chart.sort('mx', 'asc');
})

$('#x-desc').click(function () {
var _opt = chart.options();

_opt.ordering = {
accessor: 'mx',
direction: 'desc'
}

chart.options(_opt);
chart.update();
chart.sort('mx', 'desc');
})

$('#s-asc').click(function () {
var _opt = chart.options();
chart.sort('ms', 'asc');

_opt.ordering = {
accessor: 'ms',
direction: 'asc'
}

chart.options(_opt);
chart.update();
})

$('#s-desc').click(function () {
var _opt = chart.options();

_opt.ordering = {
accessor: 'ms',
direction: 'desc'
}

chart.options(_opt);
chart.update();
chart.sort('ms', 'desc');
})

});
Expand Down
85 changes: 38 additions & 47 deletions demo/bar.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,81 +113,72 @@

});

var options2 = barChart.options();

// change color
$('#color1').click(function(){
options2.color.scheme = [
'#ffe100',
'#ffbf00',
'#ff5730',
'#eb3ba6'
];

barChart.color(options2.color);
barChart.color({scheme: [
'#ffe100',
'#ffbf00',
'#ff5730',
'#eb3ba6'
]});
});

$('#color2').click(function(){
options2.color.scheme = "Cold";
barChart.color(options2.color)
barChart.color({scheme: 'Cold'});
});

$('#color3').click(function(){
options2.color.scheme = "Warm";
barChart.color(options2.color)
barChart.color({scheme: 'Warm'});

});

$('#color4').click(function(){
options2.color.scheme = d3.interpolateCubehelixDefault;
barChart.color(options2.color);
barChart.color({scheme: d3.interpolateCubehelixDefault});

});

$('#set1').click(function(){
options2.color.scheme = [
'#deebf7',
'#3182bd'
];
barChart.color(options2.color);
barChart.color({scheme: [
'#deebf7',
'#3182bd'
]});
});


$('#set2').click(function(){
options2.color.scheme = [
'#deebf7',
'#9ecae1',
'#3182bd'
];
barChart.color(options2.color);
barChart.color({scheme: [
'#deebf7',
'#9ecae1',
'#3182bd'
]});
});


$('#set3').click(function(){
options2.color.scheme = [
'#eff3ff',
'#bdd7e7',
'#6baed6',
'#3182bd',
'#08519c',
];
barChart.color(options2.color);
barChart.color({scheme: [
'#eff3ff',
'#bdd7e7',
'#6baed6',
'#3182bd',
'#08519c',
]});
});




$('#set4').click(function(){
options2.color.scheme = [
'#f7fbff',
'#deebf7',
'#c6dbef',
'#9ecae1',
'#6baed6',
'#4292c6',
'#2171b5',
'#08519c',
'#08306b'
];
barChart.color(options2.color);
barChart.color({scheme: [
'#f7fbff',
'#deebf7',
'#c6dbef',
'#9ecae1',
'#6baed6',
'#4292c6',
'#2171b5',
'#08519c',
'#08306b'
]});
});

$('#a1').click(function(){
Expand Down
2 changes: 1 addition & 1 deletion demo/car-make.html
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@
'#1f33a1',
// '#5f26c1',
];
opt.plots. boundaryGradient = ['rgba(95, 38, 193, 0)', '#5f26c1'];
opt.plots.boundaryGradient = ['rgba(95, 38, 193, 0)', '#5f26c1'];

chart.options(opt);
chart.update();
Expand Down
44 changes: 9 additions & 35 deletions demo/line.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</ul>
</div>

<div class="dropdown2" style="position: fixed; top: 10px; left: 250px;">
<div class="dropdown2" style="position: fixed; top: 10px; left: 250px; z-index: 99">
<button class="btn btn-info dropdown-toggle" type="button" id="dropdownMenu2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
Sort
<span class="caret"></span>
Expand Down Expand Up @@ -98,60 +98,34 @@
line.update();
});

var options2 = line.options();

// change color
$('#color1').click(function(){
options2.color.scheme = "BuGn";
line.color(options2.color);
line.color({scheme: 'BuGn'})
});

$('#color2').click(function(){
options2.color.scheme = "Blues";
line.color(options2.color)
line.color({scheme: 'Blues'})
});

$('#color3').click(function(){
options2.color.scheme = "Warm";
line.color(options2.color)
line.color({scheme: 'Warm'})
});

$('#color4').click(function(){
options2.color.scheme = "Cubehelix";
line.color(options2.color);
line.color({scheme: 'Cubehelix'})
});

$('#a1').click(function(){
options2.ordering = {
accessor: 'date',
direction: 'asc'
}
line.options(options2);
line.update();
line.sort('date', 'asc');
})
$('#a2').click(function(){
options2.ordering = {
accessor: 'date',
direction: 'desc'
}
line.options(options2);
line.update();
line.sort('date', 'desc');
});
$('#a3').click(function(){
options2.ordering = {
accessor: metricAccessor,
direction: 'asc'
}
line.options(options2);
line.update();
line.sort(metricAccessor, 'asc');
});
$('#a4').click(function(){
options2.ordering = {
accessor: metricAccessor,
direction: 'desc'
}
line.options(options2);
line.update();
line.sort(metricAccessor, 'desc');
});

});
Expand Down
Loading

0 comments on commit 1700d29

Please sign in to comment.