简体   繁体   中英

Setting a border on a Shield UI Chart

I am trying to show a border on my Shield UI Chart. I set it's color:

borderColor: 'red',

but it won't show. I tried to set the color as hex value:

borderColor: '#F01616',

but this doesn't help either. However when I set the same value for the charts background:

backgroundColor: 'red',

it works. What am I dong wrong?

You probably didn't set the border-width . How does your HTML markup look like?

See here in the Shield UI Documentation.

You are setting the color correct. You are right that it can be set either as

borderColor: 'red',

or as

borderColor: '#F01616',

As I can see from the previous answer and agree to it, the only thing you are missing, is to set the line thickness of your borther. However you need to use borderWidth:

borderWidth: 5,

using the internal property and not the CSS attribute border-width, at least because there is no CSS embedding.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM