I'm not sure about the 'height' vs 'max-height' styles in the container element. I recall wrestling quite a bit with styles until I found a combination that works while using only one table (rather than 2 or 4) to implement the frozen headers and columns, so I am not inclined to mess with it at this time.
Parameterizing the fixed header feature rather than making it automatic might be a reasonable choice (for the future). Perhaps a pure CSS solution is possible now in modern browsers, but we will probably have difficulties with some of the older browsers which we try to continue to support as long as feasible. Perhaps you can get what you want by wrapping your table container with another div where you specify the max-height. On Mon, Apr 30, 2018 at 11:43 AM Daniel LaLiberte <[email protected]> wrote: > I'm not seeing any delay on Chrome, and when I tested this manually a > couple years ago, there was no significant delay on the other major > browsers. Which browser and platform are you using? > > The update after scrolling is done after a small timeout to allow you to > drag the scrollbar without forcing an update after each small change. The > update involves a small number of style changes that is proportional to the > number of frozen rows (just 1) and frozen columns (could be any number). > > On Mon, Apr 30, 2018 at 11:26 AM Sean Larson <[email protected]> > wrote: > >> I agree and understand this is a desirable feature. After understanding >> how this feature is triggered, I think my issue is how it performs versus >> what the expectation of performance is of a fixed header. I am more >> concerned about other developers running into this than I am my own use. >> >> 1. If I give my container a "max-height" attribute without a height >> attribute, this will not trigger the fixed header feature but will trigger >> the overflow-y attribute if needed. In this use-case a fixed header would >> still be needed. Because of this, it is odd that the "height" attribute is >> used as a trigger as it does not describe the only time a fixed header >> would be appropriate. >> 2. The implementation may slow down the browser. Events like onScroll >> or onResize fire many, many events and I imagine this problems gets worse >> with the number of columns you have. Pure CSS would not impact browser >> performance >> 3. The current solution does not behave exactly like a fixed header. >> You can scroll down and eventually the header will appear. You can scroll >> up, and the header has not moved yet. I am not sure if this is just my >> machine or my implementation or if everyone has this issue. here is an >> example <https://makeagif.com/i/H8Yzi_> >> >> If I may suggest, >> >> 1. The fixed header should be parameterized such that the developer >> has to take action to implement it. I understand the purpose of automating >> the feature but as the API cannot determine all instances when a fixed >> header would be desirable the automation can make it confusing to debug >> why >> the HTML/CSS/JS is behaving in a way the developer did not intend/predict >> 2. Implement a pure CSS solution over script. See this gif which is >> using google charts here >> <https://makeagif.com/gif/example-css-fixed-header-429FY0> >> >> sorry about the gif quality, couldnt get access to giphy... >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Google Visualization API" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to >> [email protected]. >> Visit this group at >> https://groups.google.com/group/google-visualization-api. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/google-visualization-api/6bf880b0-7c6f-404c-a3c6-f1c535176f4d%40googlegroups.com >> <https://groups.google.com/d/msgid/google-visualization-api/6bf880b0-7c6f-404c-a3c6-f1c535176f4d%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > > -- > Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2> > [email protected] <[email protected]> 5CC, Cambridge MA > -- Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2> [email protected] <[email protected]> 5CC, Cambridge MA -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-visualization-api. To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/CAOtcSJN%2Bo%3D%3D8R%3DQhVVFbXQNtvpV%2BkfBqU4qQ_TBfCAQF_s7e2w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
