TennisVisuals / updating-radar-chart

Updating Radar Chart Visualization with extensive configuration options
MIT License
13 stars 7 forks source link

legend click - right area but wrong circle #4

Closed timelyportfolio closed 8 years ago

timelyportfolio commented 8 years ago

Clicking on the legend entries causes the area to disappear as I would expect, but the circles to remain. I'll inspect further to see what might be happening. See below for what happens when I click the orange iPhone. That might be the alas that you mention in #3.

image

TennisVisuals commented 8 years ago

hmm, I don't see that behavior in my application. Is that when you have multiple instances? Or, need to check, perhaps it's because my application sets specific colors for named data rows...

TennisVisuals commented 8 years ago

no, can't recreate it... yet

TennisVisuals commented 8 years ago

ah, set the chart.options(areas: { sort: false }) and see if that fixes it...

TennisVisuals commented 8 years ago

or, rather, masks the problem.

timelyportfolio commented 8 years ago

Ok, I'll dig deeper. It does happen with just one chart. Your suggestion sort:false does fix/mask the problem.

timelyportfolio commented 8 years ago

I think I also discovered a state issue with the legend. I have clicked both Nokia and iPhone, but only the most recent click (Nokia) gets the circle icon in the legend. However, the result in the chart is what I would expect.

image

TennisVisuals commented 8 years ago

yes, the 'state' icon change is something I have open with Susie Lu. It's an issue with how d3-legend is implemented as Legends were never intended to be controls.

TennisVisuals commented 8 years ago

I think for the moment I will just disable the 'state' icon unless and until I get a workaround for it. The sorting issue is a tricky bit of d3 coding, or at least something I don't fully understand as yet.

TennisVisuals commented 8 years ago

I think also that for the short term I will set the default for the areas.sort option to 'false'

Until I figure out the d3 contortions in this instance the problem will only surface if areas.sort is 'true' and legendClick is being used.

timelyportfolio commented 8 years ago

got it. makes sense.

timelyportfolio commented 8 years ago

If I get a block of time, I'll try to help debug/fix.

TennisVisuals commented 8 years ago

we're traveling tomorrow so I may not have much time. I've been playing with the sort and I'm not sure how useful it really is... especially since there is a legend to highlight the layers. the sort was inspired by this: http://bl.ocks.org/micahstubbs/465725cdc547c7cc8491 Still, I would like to figure out how to get d3 to place the RadarCircles in the right order...

timelyportfolio commented 8 years ago

ok, sounds good. I remember now that there is a similar sort feature in venn.js. Maybe looking at https://github.com/benfred/venn.js/blob/master/src/layout.js#L292-L309 will help.

TennisVisuals commented 8 years ago

I think I've got the scent... probably due to an inconsistency in the use of data and _data just need time to track it down... but need to sleep now.

TennisVisuals commented 8 years ago

found it. let me know if that works for you.

timelyportfolio commented 8 years ago

that works great! Do you plan to change the default back to sort:true?

Thanks so much!

TennisVisuals commented 8 years ago

yes, changing back to default sort: true fiddling a bit with legendClick toggle issue before I update

TennisVisuals commented 8 years ago

legendClick now toggles icons reliably. also disabled hover for legend items which have been toggled. let me know if it all works as expected in your context. thanks!

timelyportfolio commented 8 years ago

@TennisVisuals, thanks so much. Legend does toggle as expected now. But oh so close, when I have two, the areamouseover is disabled for both charts instead of just the one with a toggle legend. I looked quickly and could not find the scope issue, but I'll keep looking. Here is a screenshot to help explain. I clicked to toggle Nokia in top chart which disables areamouseover also in the bottom chart.

image

TennisVisuals commented 8 years ago

I will be able to take s look in about two hours

On Friday, December 4, 2015, timelyportfolio notifications@github.com wrote:

@TennisVisuals https://github.com/TennisVisuals, thanks so much. Legend does toggle as expected now. But oh so close, when I have two, the areamouseover is disabled for both charts instead of just the one with a toggle legend. I looked quickly and could not find the scope issue, but I'll keep looking. Here is a screenshot to help explain. I clicked to toggle Nokia in top chart which disables areamouseover also in the bottom chart.

[image: image] https://cloud.githubusercontent.com/assets/837910/11595679/4333d17e-9a76-11e5-8dc4-6c5d22e97a6e.png

— Reply to this email directly or view it on GitHub https://github.com/TennisVisuals/updating-radar-chart/issues/4#issuecomment-162022042 .

Charles Allen http://www.linkedin.com/in/charlesaallen http://tennisviz.blogspot.com @TennisVisuals

timelyportfolio commented 8 years ago

no rush at all, I'll be on road in a little bit and prob will have very limited time to look over the weekend. Hopefully, I can identify the lines in the next couple of minutes.

TennisVisuals commented 8 years ago

It is very simple. I removed 'var' declaration for legend_toggle when debugging and never replaced.

On Friday, December 4, 2015, timelyportfolio notifications@github.com wrote:

no rush at all, I'll be on road in a little bit and prob will have very limited time to look over the weekend. Hopefully, I can identify the lines in the next couple of minutes.

— Reply to this email directly or view it on GitHub https://github.com/TennisVisuals/updating-radar-chart/issues/4#issuecomment-162028313 .

Charles Allen http://www.linkedin.com/in/charlesaallen http://tennisviz.blogspot.com @TennisVisuals

timelyportfolio commented 8 years ago

just found that :) Thanks

TennisVisuals commented 8 years ago

Can't make the fix on my phone but will do after dinner

On Friday, December 4, 2015, timelyportfolio notifications@github.com wrote:

no rush at all, I'll be on road in a little bit and prob will have very limited time to look over the weekend. Hopefully, I can identify the lines in the next couple of minutes.

— Reply to this email directly or view it on GitHub https://github.com/TennisVisuals/updating-radar-chart/issues/4#issuecomment-162028313 .

Charles Allen http://www.linkedin.com/in/charlesaallen http://tennisviz.blogspot.com @TennisVisuals

timelyportfolio commented 8 years ago

I can change and submit pull if it helps.

timelyportfolio commented 8 years ago

but like I said, absolutely no rush on this. Happy to help though in any way I can.

TennisVisuals commented 8 years ago

done. thanks for YOUR help!

timelyportfolio commented 8 years ago

just getting back on the computer. Thanks so much. I'll try to fully test again tonight and tomorrow. I plan to make it the widget of the week, so maybe we can get some extra feedback and testing.

TennisVisuals commented 8 years ago

great. I'm available for the next hour if you spot anything.