Commit 5a20429b authored by Romain Loth's avatar Romain Loth

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

parent dbf1f1b6
...@@ -418,15 +418,14 @@ function Main_test( data , initial) { ...@@ -418,15 +418,14 @@ function Main_test( data , initial) {
// // .xUnits(d3.time.months) // // .xUnits(d3.time.months)
.renderlet(function (chart) { .renderlet(function (chart) {
chart.select("g.y").style("display", "none"); chart.select("g.y").style("display", "none");
LineChart.filter(chart.filter());
console.log("lalaal moveChart.focus(chartfilt);")
}) })
.on("filtered", function (chart) { .on("filtered", function (chart) {
dc.events.trigger(function () { dc.events.trigger(function () {
var chartfilt = chart.filter() var chartfilt = chart.filter()
console.log("lalaal move chart", chartfilt)
// tricky part: identifying when the moveChart changes. // tricky part: identifying when the moveChart changes.
if(chartfilt) { if(chartfilt) {
Push2Buffer ( chart.filter() ) Push2Buffer ( chartfilt )
} else { } else {
if(TheBuffer) { if(TheBuffer) {
Push2Buffer ( false ) Push2Buffer ( false )
......
...@@ -524,16 +524,16 @@ function Main_test(Data) { ...@@ -524,16 +524,16 @@ function Main_test(Data) {
.xUnits(d3.time.months) .xUnits(d3.time.months)
.renderlet(function (chart) { .renderlet(function (chart) {
chart.select("g.y").style("display", "none"); chart.select("g.y").style("display", "none");
moveChart.filter(chart.filter());
}) })
.on("filtered", function (chart) { .on("filtered", function (chart) {
dc.events.trigger(function () { dc.events.trigger(function () {
var chartfilt = chart.filter() var chartfilt = chart.filter()
console.log("lalaal move chart", chartfilt)
// tricky part: identifying when the moveChart changes. // tricky part: identifying when the moveChart changes.
if(chartfilt) { if(chartfilt) {
console.log("chart.filter()") console.log("chart.filter()")
console.log(chart.filter()) console.log(chartfilt)
Push2Buffer ( chart.filter() ) Push2Buffer (chartfilt)
} else { } else {
if(TheBuffer) { if(TheBuffer) {
Push2Buffer ( false ) Push2Buffer ( false )
......
...@@ -418,15 +418,14 @@ function Main_test( data , initial) { ...@@ -418,15 +418,14 @@ function Main_test( data , initial) {
// // .xUnits(d3.time.months) // // .xUnits(d3.time.months)
.renderlet(function (chart) { .renderlet(function (chart) {
chart.select("g.y").style("display", "none"); chart.select("g.y").style("display", "none");
LineChart.filter(chart.filter());
console.log("lalaal moveChart.focus(chartfilt);")
}) })
.on("filtered", function (chart) { .on("filtered", function (chart) {
dc.events.trigger(function () { dc.events.trigger(function () {
var chartfilt = chart.filter() var chartfilt = chart.filter()
console.log("lalaal move chart", chartfilt)
// tricky part: identifying when the moveChart changes. // tricky part: identifying when the moveChart changes.
if(chartfilt) { if(chartfilt) {
Push2Buffer ( chart.filter() ) Push2Buffer ( chartfilt )
} else { } else {
if(TheBuffer) { if(TheBuffer) {
Push2Buffer ( false ) Push2Buffer ( false )
......
...@@ -2187,15 +2187,14 @@ function MainTableAndCharts( ngdata , initial , search_filter) { ...@@ -2187,15 +2187,14 @@ function MainTableAndCharts( ngdata , initial , search_filter) {
// // .xUnits(d3.time.months) // // .xUnits(d3.time.months)
.renderlet(function (chart) { .renderlet(function (chart) {
chart.select("g.y").style("display", "none"); chart.select("g.y").style("display", "none");
LineChart.filter(chart.filter());
// console.log("lalaal moveChart.focus(chartfilt);")
}) })
.on("filtered", function (chart) { .on("filtered", function (chart) {
dc.events.trigger(function () { dc.events.trigger(function () {
var chartfilt = chart.filter() var chartfilt = chart.filter()
console.log("lalaal move chart", chartfilt)
// tricky part: identifying when the moveChart changes. // tricky part: identifying when the moveChart changes.
if(chartfilt) { if(chartfilt) {
Push2Buffer ( chart.filter() ) Push2Buffer ( chartfilt )
} else { } else {
if(TheBuffer) { if(TheBuffer) {
Push2Buffer ( false ) 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