-
Notifications
You must be signed in to change notification settings - Fork 18
Add a SVG legend writer in order to customize a legend completely #755
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
Conversation
Signed-off-by: Slimane AMAR <[email protected]>
Signed-off-by: Slimane AMAR <[email protected]>
Signed-off-by: Slimane AMAR <[email protected]>
09faa6a to
a57b624
Compare
rolnico
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add some tests on SVGLegendWriter, to test it with another implementation than the default one?
Also, could you indicate the breaking changes? I see that at least the method getBusLegendInfos(VoltageLevelGraph graph) has been removed from the interface LabelProvider
|
|
||
| legendRootElement.appendChild(gNode); | ||
|
|
||
| metadata.addBusLegendInfoMetadata(new GraphMetadata.BusLegendInfoMetadata(escapedIdNode)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now this metadata is specific to this writer only. Shouldn't this be in the API of SVGLegendWriter, in order to have this filled for all implementations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finally removed as after investigating the BusLegendInfoMetadata is unused. Moreover, it's simply a list of svg ids, no additional information.
…o add_legend_provider
Signed-off-by: Slimane AMAR <[email protected]>
Signed-off-by: Slimane AMAR <[email protected]>
5fa8407 to
7f2d769
Compare
Signed-off-by: Slimane AMAR <[email protected]>
…o add_legend_provider
|



Please check if the PR fulfills these requirements
Does this PR already have an issue describing the problem?
No
What kind of change does this PR introduce?
Feature
What is the current behavior?
The legend format is not currently customizable
What is the new behavior (if this is a feature change)?
The legend is entirely customizable
Does this PR introduce a breaking change or deprecate an API?
If yes, please check if the following requirements are fulfilled
What changes might users need to make in their application due to this PR? (migration steps)
The method
getBusLegendInfoshas been removed fromLabelProviderinterfaceNow SLD legends are managed in the
SVGLegendWriterinterfaceSee
DefaultSVGLegendWriterclass for usage