Jump to content
JChartFX Community
  • 0
Sign in to follow this  
timopu

Motif and palette selector?

Question

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).

JuanC

Share this post


Link to post
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.

 

Regards,

 

JuanC

Share this post


Link to post
Share on other sites
  • 0

Ok, thanks again. Actually I checked the implementation more throughly, and noted that motif change causes a page reload, but palettes seem to be loaded "on demand". 
Got to try that motif setup, because I didn't find a way to set it myself.

br,

Timo

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×