Is it possible to style an Entity Relation Diagram with Mermaid.js like Flowcharts to indicate a difference in entities? - erd

I can't seem to style any elements within my ERD.
Having an entity called PERSON, any of the following code results in a syntax error:
style PERSON fill:#f9f;
or
classDef className fill:#f9f;
class PERSON className;
or
classDef default fill:#f9f;
Looking at the documentation, I should be able to use simple styling:
https://mermaid-js.github.io/mermaid/#/entityRelationshipDiagram?id=styling
Basically I'm trying to make a high level ERD where I need to mark certain entities to indicate a difference.
Any help or advice would be appreciated. :-)

I wasn't in luck either. In flowcharts it seems possible to style and shape the nodes though.
https://github.com/mermaid-js/mermaid/blob/develop/docs/examples.md

It's not currenly possible to style erDiagrams in Mermaid JS per github issue: https://github.com/mermaid-js/mermaid/issues/2673

Related

How can I select an XPath with multiple conditions

From this website, I want to get all genres in the Genres & Subgenres menu using the selenium framework. For that, I need a general xpath or css selector that applies to all of them. I have noticed that all genres have "genreid:D+++" as a part of their id and are located in tag. How can I use this information to get all genres? If you know a better way to solve my problem please write it.
https://www.allmovie.com/advanced-search
Xpath for all Genres & Subgenres
//input[contains(#id,'genreid')]
I'm more familiar with CSS than XPath so I will answer that part of your question.
To make a CSS selection for an element ID that starts with genreid, you'd use this selector:
[id^=genreid]
That will give you the checkboxes. If you wanted the <li> elements that contain them, you could just select by the classname: .genre
For more info about CSS selection, see MDN's great documentation here.

How to apply css to particular selected child in ivh-treeview?

<div class="box-body">
<div ivh-treeview="dTree"
ivh-treeview-id-attribute="'uic'"
ivh-treeview-use-checkboxes="false"
ivh-treeview-on-click="my_tree_handler(ivhNode)">
</div>
</div>
and function in controller class:
$scope.my_tree_handler = function (branch) {
branch.style.color = "red"; // "branch" is an object by the way
};
I want to apply css styling features to particular selected item, but I don't know how to do that. Documentation of this plagin "ivh-treeview" is not that helpful
welcome to Stack Overflow!
It would be very helpful if you filled us in on what you've tried or specifically how the ivh-treeview documentation is not clear. As one of the project maintainers I would love to know where our docs are falling short :).
Have you looked at the templates and skins section of the docs? This directive supports a default set of classnames which you can use to style your tree. When that's not enough, as in your case, you may provide your own node templates for the directive to use. There are a number of examples which demonstrate how custom templates can be used to create more or less arbitrary tree views.
Here's an example where custom templates are used to apply different styles to selected vs non-selected nodes. In this case we're doing some fun ascii checkboxes but the general idea is the same: observe some node property to affect the node representation.

How to style form element in the angular-schema-form schema and not the form?

I am building a form using the awesome angular-schema-form. I am able to create my form schema object quite successfully. I am wanting (hoping) to be able to set all the form components in the schema using the x-schema-form property in the schema object.
I am able to specify the type and the titleMap's for selects all perfectly. However where I am having an issue is assigning a style to the element using the "x-schema-form" - it just seems to be being ignored.
So when I do the following (Note I have the Ionic Framework)
"x-schema-form": {
"type": "textarea",
"style": "item item-input"
}
The "style" is not getting passed to the form. If I pass the style in the $scope.form [] then I get the style. I am however trying to do this all in the schema as it would be much easier for me to do it in one place due to the nature in which I get the list of form elements.
Any advice on this would be greatly appreciated.
Thanks
BrentR
so asf doesn't actually support the style attribute at all, so what you're trying there is not possible at the moment. However you can use x-schema-form to apply a fieldHtmlClass and then via CSS apply styling.
You can read more on the standard options in the documentation. https://github.com/Textalk/angular-schema-form/blob/master/docs/index.md#standard-options

What are the best practices in order to add custom semantic markup to XForms?

Greetings to all Orbeon's folks,
I would like to add custom xml semantic markup to a XForms using Orbeon.
For instance, adding the tag or the property "person".
So do I have to create new tags or properties or both? What is the best practice? Considering differences between marking-up structures and marking-up elements?
Where can I put semantic markup without disturbing the behaviour of the Orbeon engine and still being able to access to it? I think it should be in the model declaration? Am I wrong?
Thanks
Use the label or hint elements to add metadata which is hidden or context-sensitive. Use placeholders to show that data as an annotation:
<xforms:label appearance="minimal">Your name</xforms:label>

jwebunit to check css style

I'm trying to assert the current styling of a div. For example, is it set to visible or not. I wasn't able to find a way in jwebunit to get at this information though. Ideas? Alternate approaches?
Constraint: I cannot change the page I am trying to test.
There are two TestEngines which you can use with JWebUnit, HTMLUnit and Selenium. why not System.out.println("========="+ getPageSource()); and see if the page source return from both TestEngines gives css within the output. If they do that means you can verify css, if the output does not give css then i guess you will not be able to verify. One thing i know for sure is that it will show you the css file the page uses for style but as to the styling being applied I will say not, but try it

Resources