Commit f50c45bf authored by Romain Loth's avatar Romain Loth

[FIX] chart filter bug (was freezing after some changes)

parent b2d1cd65
......@@ -418,15 +418,14 @@ function Main_test( data , initial) {
// // .xUnits(d3.time.months)
.renderlet(function (chart) {
chart.select("g.y").style("display", "none");
LineChart.filter(chart.filter());
console.log("lalaal moveChart.focus(chartfilt);")
})
.on("filtered", function (chart) {
dc.events.trigger(function () {
var chartfilt = chart.filter()
console.log("lalaal move chart", chartfilt)
// tricky part: identifying when the moveChart changes.
if(chartfilt) {
Push2Buffer ( chart.filter() )
Push2Buffer ( chartfilt )
} else {
if(TheBuffer) {
Push2Buffer ( false )
......
......@@ -524,16 +524,16 @@ function Main_test(Data) {
.xUnits(d3.time.months)
.renderlet(function (chart) {
chart.select("g.y").style("display", "none");
moveChart.filter(chart.filter());
})
.on("filtered", function (chart) {
dc.events.trigger(function () {
var chartfilt = chart.filter()
console.log("lalaal move chart", chartfilt)
// tricky part: identifying when the moveChart changes.
if(chartfilt) {
console.log("chart.filter()")
console.log(chart.filter())
Push2Buffer ( chart.filter() )
console.log(chartfilt)
Push2Buffer (chartfilt)
} else {
if(TheBuffer) {
Push2Buffer ( false )
......
......@@ -418,15 +418,14 @@ function Main_test( data , initial) {
// // .xUnits(d3.time.months)
.renderlet(function (chart) {
chart.select("g.y").style("display", "none");
LineChart.filter(chart.filter());
console.log("lalaal moveChart.focus(chartfilt);")
})
.on("filtered", function (chart) {
dc.events.trigger(function () {
var chartfilt = chart.filter()
console.log("lalaal move chart", chartfilt)
// tricky part: identifying when the moveChart changes.
if(chartfilt) {
Push2Buffer ( chart.filter() )
Push2Buffer ( chartfilt )
} else {
if(TheBuffer) {
Push2Buffer ( false )
......
......@@ -2187,15 +2187,14 @@ function MainTableAndCharts( ngdata , initial , search_filter) {
// // .xUnits(d3.time.months)
.renderlet(function (chart) {
chart.select("g.y").style("display", "none");
LineChart.filter(chart.filter());
// console.log("lalaal moveChart.focus(chartfilt);")
})
.on("filtered", function (chart) {
dc.events.trigger(function () {
var chartfilt = chart.filter()
console.log("lalaal move chart", chartfilt)
// tricky part: identifying when the moveChart changes.
if(chartfilt) {
Push2Buffer ( chart.filter() )
Push2Buffer ( chartfilt )
} else {
if(TheBuffer) {
Push2Buffer ( false )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment