ChartJS charts width and height set to 0 when responsive and dragged. Any ideas as to why? - chart.js

I am in the process of building a dashboard with multiple charts on it. For a chart library I've landed on VueChartJS, with the vue-chart-3 wrapper and for a drag n drop library I'm using vue-draggable-next.
The issue I'm having is that if the charts have the responsive option as true and you drag them, their height and width are set to 0. I added a toggle to prove that it's an issue with the responsive feature, but is there anything else I can do to remedy this issue?
Right now I'm wondering if I need to make some invisible toggle that activates every time you click the chart to drag it around and then toggles off when you are done dragging, but that seems like a lot of potential code and time to impliment this feature and wonder if there's not just a better way to do this?
Any advice or help would be greatly appreciated!
I've made a CodeSandbox to show the issue and there is a gif below as well showing what is happening.

Related

Swiftui fixed background across views in a Navigation Hierarchy

I'm building an app in Swiftui and want to have a fixed image background that is consistent among all screens and is also enclosed in a Navigation Stack Hierarchy, meaning I can go on to different screens and swipe from left-to-right to go back, etc while still have the fixed image background.
I have tried various solutions but havent been able to achieve this. Closest thing I came up with was to create a full screen overlay but that doesnt solve the problem. Any and all help is appreciated :)

Foundation 6 Reveal Modal + Slick Slider Not Playing Nicely

OK, so I have noticed this on a couple of sites that I am building right now, but for debugging purposes let's use this one; http://bsmgpdev.org.uk/
When viewing on a mobile (iPhone X currently here) and clicking either the search or menu icon, the slider seems to jump/expand horizontally as the reveal modal opens/closes.
Now, I'm entirely sure it's something I've done, or missed, I don't doubt that for one minute, but could anybody point me in the right direction or (even better) tell me how to fix this?
Thanks

rectangle covers visuals making them hidden Power BI Desktop

Inside the rectangle I placed slicers.
Clicking on the uncovered part of the rectangle moves it in front of the visualizations making them unavailable to interact with, or hidden.
I "Send to back" rectangle but it didnt help.
The visuals are on a picture below:
But if I just hoover mouse on a rectangle area - it covers all visuals:
Any solution to just always keep re
Yeah, that's pretty annoying. I'd suggest voting for this idea and maybe Microsoft will fix this eventually.
Currently, the only workaround I can think of would be to make the colored rectangle part of the page background as an image.

Overdrawing on the toolbar? Alternative idea?

Main aim is wanting to draw Tab's within the draw area of the Toolbar of the Applicaiton for a NoteBook or Tab's to use the above space instead of being bellow the toolbar.
The frame work we're using is WxWidgets, C++/C. I have looked around but have not been able to find a solution or if anyone has done a similar approach with drawing tab's actually inside the toolbar itself.
I read some Microsoft MSDN articles and they recommend against controls drawing over controls.
I did some test's today, and think I've come up with a solution. My solution is to draw the window like normal, but have the NoteBook on the right in a child window that is dynamically resized and repositioned so that it's tab's are overlay on-top of the toolbar to make the most effective use of the area. I would have to deal with on focus and lose focus window messages, but this is the most elegant way I can think about achieving the task.
Any Idea's you can recommend or problem's I may face with following this approach.
I would be concerned about using overlapping widgets like this. Although it may not look quite the same visually I would suggest looking at wxToolBook which puts tabs in a toolbar and would solve your problem, you could use the GetToolBar method to insert your own toolbar items.
If that wasn't close enough visually to what you are looking to achieve I would suggest deriving a new control from wxBookCtrlBase and then creating a tab control with custom drawn tabs which you could add to the toolbar using wxToolBar::AddControl.

How to fix an MFC Painting Glitch?

I'm trying to implement some drag and drop functionality for a material system being developed at my work. Part of this system includes a 'Material Library' which acts as a repository, divided into groups, of saved materials on the user's hard drive.
As part of some UI polish, I was hoping to implement a 'highlight' type feature. When dragging and dropping, windows that you can legally drop a material onto will very subtly change color to improve feedback to the user that this is a valid action.
I am changing the bar with 'Basic Materials' (Just a CWnd with a CStatic) from having a medium gray background when unhighlighed to a blue background when hovered over. It all works well, the OnDragEnter and OnDragExit messages seem robust and set a flag indicating the highlight status. Then in OnCtrlColor I do this:
if (!m_bHighlighted) {
pDC->FillSolidRect(0, 0, m_SizeX, kGroupHeaderHeight, kBackgroundColour);
}
else {
pDC->FillSolidRect(0, 0, m_SizeX, kGroupHeaderHeight, kHighlightedBackgroundColour);
}
However, as you can see in the screenshot, the painting 'glitches' below the dragged object, leaving the original gray in place. It looks really ugly and basically spoils the whole effect.
Is there any way I can get around this?
Remote debugging is a godsend for debugging visual issues. It's a pain to set up, but having a VM ready for remote debugging will pay off for sure.
What I like to do is set a ton of breakpoints in my paint handling, as well as in the framework paint code itself. This allows you to effectively "freeze frame" the painting without borking it up by flipping into devenv. This way you can get the true picture of who's painting in what order, and where you've got the chance to break in a fill that rect the way you need to.
It almost looks like the CStatic doesn't know that it needs to repaint itself, so the background color of the draggable object is left behind. Maybe try to invalidate the CStatic, and see if that helps at all?
Thanks for the answers guys, ajryan, you seem to always come up with help for my questions so extra thanks.
Thankfully this time the answer was fairly straightforward....
ImageList_DragShowNolock(FALSE);
m_pDragDropTargetWnd->SendMessage(WM_USER_DRAG_DROP_OBJECT_DRAG_ENTER, (WPARAM)pDragDropObject, (LPARAM)(&dragDropPoint));
ImageList_DragShowNolock(TRUE);
This turns off the drawing of the dragged image, then sends a message to the window being entered to repaint in a highlighted state, then finally redraws the drag image over the top. Seems to have done the trick.