Replies: 1 comment
-
|
I do not know for certain, as I have not used a collection of VisualElements in my code before, but my hunch is that these visuals are drawn based on the ZIndex values of their Paint properties (Stroke, Fill, etcetera). Thus, you will likely need to perform a check after you insert your visual element that inspects the ZIndex values of the Paint properties of the VisualElements that precede or come after your newly inserted element, then manually update the ZIndex values accordingly (such as add +1 / -1). Unfortunately, that's the only idea I can think of given my limited knowledge, but please do give that a try; I have seen ZIndex used substantially in the classes that define the default tooltip and legend, and I'm pretty sure that it will be integral to resolving your issue. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am looking for a way to change drawing order.
I have:
Livecharts 2.0.0-rc5.4;
Private VisualElements As ObservableCollection(Of Kernel.ChartElement)
I tried:
VisualElements.Insert(0, g)
VisualElements.Add(g)
So inserting at the beginning does nothing in terms how elements are drawn. Is there a way to have zorder on visuals or geometries?
Beta Was this translation helpful? Give feedback.
All reactions