I am using the ReactJS version of the CanvasJS library.
I have some charts laid out on the screen such that they take up close to 100% height and width on a mobile device.
When I place my fingers on the chart and drag (in order to scroll down the page), I am unable to scroll. This issue doesn't happen on other parts of the page where I don't have the chart.
Is there any way to get scrolling working properly when touching these charts on mobile?
Figured it out.
I had the CanvasJS component wrapped inside a div component.
This div component had the following CSS attributes applied to it:
overflow-y:auto;
overflow:scroll;
overflow-x:auto;
Once I removed those CSS attributes (which didn't need to be there in the first place) I was able to touch-drag on the chart component on mobile.
Related
I am currently building an app which uses Mantine components. I have a list which I am paginating, and rendering using React-Infinite-Scroll-Component. I want to change the style of the scrollbar of the InfiniteScroll component to look like the Mantine ScrollArea scroll bar, is there a way to use the ScrollArea component to wrap it? If not, how would I go about styling the scroll bar?
Have a look at this CodeSandboxLink to see exactly what the difference is.
I have a webpage I made in React. It renders some charts. The charts will appear slightly differently depending if the user is viewing the page on desktop or mobile.
I have used html2canvas and jsPDF to export the page to PDF. The problem is that I ALWAYS want to export the charts in the format seen in mobile view.
I have thought of the following:
rendering the mobile view inside a div with display set to none and using that div as the input to html2canvas. This does not work. I get an error.
Trying the above, but instead of using the hidden div, just send the div as the input to html2canvas inline. I do not know if you can even do this.
Using React-pdf to output the pdf. The problem here is that I do not know how to embed the charts when using react-pdf.
Does anyone have an idea of what I can try?
Thank you.
I'm working on a site where I use vh for the height of my components. When they click on an input and the mobile keyboard pops up it shrinks the viewport height therefore shrinking all my components on top of each other. I have seen plenty of vanilla js and app specific code. I'm not sure what to do in pure react javascript.
Image showing problem triggering scrollview when touching absolute component outside
Please see above photo which describes the issue.
I'm newish to React Native layout and specifically ScrollView.
How can I make it possible for user to touch and drag anywhere on screen to initiate scroll INCLUDING touching on top of this absolute component which is outside of the scrollview?
I have several Fusioncharts on my page and some of them are outside the viewport.
Usually, they render as soon as the user scrolls the page and make them visible.
Now, I have to export all those charts and, so, I need them to be rendered before starting the export process: is there a way to force the rendering without asking the user to scroll the page down?
Well a hack would be to use JavaScript to scroll to bottom and then again to top before exporting.