Is there a way to have a single column of elements inside a PlantUML component diagram? - plantuml

I'm trying to vertical align, on a single column, elements of a PlantUML component diagram.
I tried with both "top o bottom direction" and "left to right direction" options, but with no good result.
Only way I found is to wrap every element inside an anonymous "frame" and to set the "left to right direction" option.
Is there a way to avoid this?
As a related question, is there a documentation that explain how elements are aligned to the final view, and how "top to bottom" and "left to right" are supposed to work?
Many thanks!

You can vertically align all components with no dependency, by switching to the left to right direction and using the down indicator.
#startuml
left to right direction
[a] -down-> [b]
[c] -down-> [d]
[e] -down-> [f]
#enduml
In addition to that, you can further enforce object positions by using [hidden] arrows. See "Help on layout" in the class diagram documentation.
#startuml
[x] -[hidden]down- [down]
[x] -[hidden]up- [up]
[x] -[hidden]left- [left]
[x] -[hidden]right- [right]
#enduml
I don't think there is more documentation other what you can find in the official docs, the forum and the source code. PlantUML is limited in its styling and positioning capabilities.
If you need something management-ready, maybe consider exporting a graph as SVG and edit it using a tool which can edit vector graphics. (i.e. Inkscape, Microsoft Visio, ...)

Related

SciChart annotation that is on the axis and above with "normal" paning behavior

I have a situation in which I have a chart annotation that represents an event that happened. I want to add a marker that consists of several icons in the middle of it (see 1 and 2):
I tried the axismarkerannotation but it has a weird behavior of snapping its middle point and when it is paning out of range it disappears.
I saw there is the possibility to place an annotation on the ModifierSurface but couldn't find an example.
I will fiddle around with this approach but perhaps someone has an solution for this? I want both markers to be visible and not when the potin in between 1 and 2 is out of sight both dissapear...
Is treating both icons as seperate annotations the only viable solution?

How to draw trendlines in lightweight-charts with left or right extension?

How to draw lines between any two highs or lows of the candlestick bars to make a slanted trend line that can extend to left or right or both directions?
Extending left or right by creating a custom series manually using y = mx + b formula seems plausible, but a direct straight-forward method would be more appropriate.
It's impossible right now. lightweight-charts doesn't support drawings at all (except workaround for drawing trend line with series with the only 2 points).
We aren't going to add drawing itself to the library, but we thought about extending the API to allow you draw on canvas directly. If you'd like to use drawings, I can suggest you take a look at charting_library.

scichart how to delete left and right MajorGridLines

I custom TickProvider,and the MajorGridLines is show correct.
but it's weird on the left and right.
There is double line,how to delete left and right MajorGridLines and show label on the left and right?
Its hard to say. Have you pointed WPF Snoop at your applicaiton to determine the source of the line?
Things it could be:
It could be a gridline from your own TickProvider output
It could be the right border of the SciChartSurface.RenderSurface or SciChartSurface.Gridlinespanel
It could be the left border of the NumericAxis on the right
Have a look at the documentation on Templating and Styling Chart Parts to see what parts of the chart you can colour and how.

How do I make a component go above the Tab menu?

When I click the "Tabs" component, it shows it as the whole thing around the edges (except the top part that says "Interactive Stories").
I want to know how I'd make the MultiButton go just above the menu at the bottom of the "Tabs" component. So an area with a BorderLayout and when I set it's layout constraint to "South", I want is so that it's above the menu, not underneath it. Because if I previously tried to just do that, the menu part of "Tabs" would overlap it.
I've already watched the "HOW DO I - POSITIONING COMPONENTS USING LAYOUT MANAGERS" video and that didn't explain what I want; if it did, I didn't catch it.
Here's the github repo if that'd help at all: https://github.com/gogobebe2/InteractiveStories
If you need me to clarify things, since I admit it may not be good english, please tell me. I'm determined to fix this. Thanks heaps :)
Edit: Solved! Opened the theme.res file, went to the constants tab in the theme and removed the tabsOnTopBool constant boolean. Big thanks to https://stackoverflow.com/users/756809/shai-almog
The Tabs component has a special mode that is activated in the leather theme to allow the "arrow effect" to overlay on top of the UI. It then adds padding to the bottom of the content pane to allow you to scroll more within the tab.
It uses the theme constant tabsOnTopBool=true to do that and if this is the case it uses a special form of BorderLayout:
border.setCenterBehavior(BorderLayout.CENTER_BEHAVIOR_TOTAL_BELOW);
If you check out the docs for CENTER_BEHAVIOR_TOTAL_BELOW you will see:
The center component takes up the entire screens and the sides are
automatically placed on top of it thus creating a layered effect
This is somewhat undocumented so I'm adding the documentation of this to my task list...
You are on the right track with placing it at the South in the Tab. And infact that's the best way to do it.
You can give the Story Maker container a unique styling, let's say ContainerBottomMargin2 that has 2mm bottom margin or padding. This will push the container up a bit to avoid overlapping.
You can also style your TabsContainer to have 2mm top padding.
Because North, South, East and West, all have more priority over center, the Tab buttons will always cover components at the TabbedPane if possible. As the buttons are sitting in the South and you are adding your contents to the center.

How do I turn an arrow to the right, then down, using PlantUML?

How do I turn an arrow to the right, then down, using PlantUML?
Here's an example of what I am trying to do.
#startuml
(*) -right-> "."
--> Some Activity
--> (*)
#enduml
The thing I want to do is shown on the following image:
Sorry, I don't think you can. I often make a few tweaks in layout with
left to right direction
-right->, -left->, -down->
ordering
clustering (i.e. box)
But no more than that, because I found that it easily costs more time to manually layout in PlantUML than to draw in a tool like Visio.
If a need a diagram which is very compact, or visually expressive, I use Visio. The other 90%: PlantUML.
What I like most of plantUML is that it creates well readable graphs in a fraction of the time to draw (and in a more maintainable way) (which is why I worked a lot on the PlantUML word add-in, which saves me time in my work).

Resources