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();
legBoxItem.setMarkerShape(cfx.MarkerShape.Rect);
legBoxItem.getAttributes().setColor("#000000");
legBox.getCustomItems().add(legBoxItem);
...
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.
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.
Question
papa.stiff
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();
legBoxItem.setMarkerShape(cfx.MarkerShape.Rect);
legBoxItem.getAttributes().setColor("#000000");
legBox.getCustomItems().add(legBoxItem);
...
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.
Cheers,
papa.stiff
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
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.