Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when drawing arrow linestyle with specific measures in gantt diagrams #1595

Open
kkrafft1999 opened this issue Nov 7, 2023 · 2 comments
Labels

Comments

@kkrafft1999
Copy link

kkrafft1999 commented Nov 7, 2023

Describe the bug
When I put an arrow styling within the gannt diagram style:

@startgantt
<style>
ganttDiagram {
	arrow {
        LineStyle 8.0;13.0
	}
}
</style>
...
@endgantt

This result in a pasrsing error.

To Reproduce
Steps to reproduce the behavior:

Just put the styling above in your pgantt diagram

Expected behavior
Arrows should be drawn with the specific styling linestyle parameters

Screenshots
If applicable, add screenshots to help explain your problem.
image

Desktop (please complete the following information):

  • Windows 10
@github-actions github-actions bot added the triage label Nov 7, 2023
@laurateixeir
Copy link

laurateixeir commented Nov 28, 2023

After reviewing the guide and the documentation for the gantt diagramm and checking the code i found out that it is possible to apply the linestyle. Instead of a semicolon it is possible to just use a dash. When using the dash the Linestyle 8.0-13.0 is slightly different from using 8.0;13.0.

This is because the LineStyle only can be set like that when LineThickness is set also. Somehow the LineStyle relies on the LineThickness. I am still trying to figure out where in the code this is set.

With dash:

@startgantt

<style>
timeline {
    BackGroundColor Grey
    FontName Helvetica
    FontSize 20
    FontColor Blue
}
arrow {

    LineStyle 8.0-13.0

}

</style>

[Task1] lasts 20 days
note bottom
 memo1 ...
 memo2 ...
 explanations1 ...
 explanations2 ...
end note

[Task2] lasts 4 days
[Task2] starts 3 days after [Task1]'s end
[Task1] -> [Task2]
-- Seperator Title --

[M1] happens on 5 days after [Task1]'s end

-- end --

@endgantt

Output:

grafik

With LineThickness:


@startgantt

<style>
timeline {
    BackGroundColor Grey
    FontName Helvetica
    FontSize 20
    FontColor Blue
}
arrow {
    LineStyle 8.0;13.0
    LineThickness 1.0
}

</style>

[Task1] lasts 20 days
note bottom
 memo1 ...
 memo2 ...
 explanations1 ...
 explanations2 ...
end note

[Task2] lasts 4 days
[Task2] starts 3 days after [Task1]'s end
[Task1] -> [Task2]
-- Seperator Title --

[M1] happens on 5 days after [Task1]'s end

-- end --

@endgantt

Output:

grafik

@laurateixeir
Copy link

laurateixeir commented Nov 28, 2023

In the class UStroke (package net.sourceforge.plantuml.klimt;) i found the dependency for the Linethickness.

	public UStroke(double dashVisible, double dashSpace, double thickness) {
		this.dashVisible = dashVisible;
		this.dashSpace = dashSpace;
		this.thickness = thickness;
	}

also you can see here in the class GantArrow (package net.sourceforge.plantuml.project;) in the method drawU that the Thickness is given here so this could be the reason why it is not possible to set the measure without it.

ug = ug.apply(UStroke.withThickness(1.5)).apply(style.value(PName.LineColor).asColor(colorSet).bg());

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants