Jump to content
JChartFX Community
  • 0

How do you change the default fill color of a rectangle-shaped custom legend item?



I am adding a custom legend item with a rectangle marker in my legend box. I was trying to use this code to do that:


var legBoxItem = new cfx.CustomLegendItem();





but the color that changed is the outline of the marker not the fill color which is still white.  I have also tried setting a tag name to the item and add a "fill:" in the chart css but that did not work either. I am currently settling with the marble marker shape because that is the only shape that auto-fills its interior with the set color, albeit in gradient.

Any clues/tips are appreciated.





Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

This is a bug, we are in the process of testing a fix for it.

In the meantime you can workaround the bug by changing the MarkerStyle for all series to Filled, to retain the look of your markers you can then set the MarkerStyle for each series to Hollow, e.g. if your chart has 2 series







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