-1
People would like to know how to search an image instead of color in this javascript array below Instead:
<script>
array var arrDados = [{title: "Dados 1", value: 1, **color**: "#fe4400"}]
</script>
I wanted to change to search image, only that the form below is not correct:
<script>
var arrDados = [ {title: "Dados 1", value: 1, background-image: "www.site.com.br/imagem/figura.png"}]
</script>
Where is color drawing pick up an image. Thank you for your help
Where is the image?
– Sam
I want instead of color, the array to pull an image from the server. For example, var arrDados = [ {title: "Data 1", value: 1, background-image: "www.site.com.br/image/figure.png" }. Only that way the image is not searched. What would be the right way?
– Carlos Magalhães
<script >var arrDados = [ {title: "Data 1", value: 1, background-image: "www.site.com.br/image/figure.png" }]</script >
– Carlos Magalhães
It is good to edit the question and put the information.
– Sam
I don’t understand exactly anything. Reread your question and see if it’s logical. Tell us more, especially where you’re getting the information.
– Mauro Alexandre
I just want to know how to change color to image in this script: <script >var arrdados = [ {title: "Data 1", value: 1, color: "#fe4400" }, {title: "Data 2", value: 1, color: "#de4400" }, {title: "Data 3", value: 1, color: "#be4400" }, {title: "Data 4", value: 1, color: "#ce4400" } ]; Alert (title','+value',' +color</script> because using background-image instead of color does not work. I’ve tried backgroundImage and it doesn’t work either.
– Carlos Magalhães
Look I have a pieChart that returns in color. Only I want to insert image instead of color in pizza. For example, 55% is Corinthians and 45% is Palmeiras. Instead of colors, comes the shirt of the clubs in the pizza
– Carlos Magalhães
Take a look at this model and see if you understand: https://codepen.io/maikonmatheus/pen/LVwPQV
– Carlos Magalhães
I think this only accepts color, seems to be a svg.
– Sam