Jump to content
JChartFX Community
  • 0

Motif and palette selector?



3 answers to this question

Recommended Posts

  • 0

The way motifs work, charts/gauges properties are modified when objects are constructed (to allow for your customizations to override motif customizations).

Because of this, if you are going from motif A to motif B it is not trivial to try to "undo" the actions on motif A before trying to apply B. It does not need necessarily a full page reload but recreating the charts is the simple way to achieve this (if the motif change is happening on the client side).


Link to comment
Share on other sites

  • 0

Please note that each motif is a js and each palette is a css file so if your solution is server side, the simple way to do this would be to allow these dropdowns to change some url parameters and regenerate the page in question using the appropriate motif/palette combination.


If you want to change them "client side", you could include various/all motifs on the same page, to change a motif you would have to execute something like this


cfx.motif = "block"


And later recreate the charts/gauges in the page.


Changing the palette is a little more involved because it would require you "unloading" a css before loading the new palette. I will check with the team that created that page and the motif page to see if they can provide extra details in this thread.





Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...