I want to change/fill area of plotly Area graph with our choice of colour instead of blue. But I'm unable to change it. I referred This Code.
Graph is ing like this:
I want to change/fill area of plotly Area graph with our choice of colour instead of blue. But I'm unable to change it. I referred This Code.
Graph is ing like this:
Share Improve this question edited Sep 30, 2016 at 16:21 Maximilian Peters 31.8k12 gold badges94 silver badges102 bronze badges asked Sep 30, 2016 at 15:46 Anil JagtapAnil Jagtap 1,8106 gold badges29 silver badges45 bronze badges 01 Answer
Reset to default 8Just add fillcolor
to your data.
var trace1 = {
x: ['Nov 2013', 'Dec 2013', 'Jan 2014', 'Feb 2014'],
y: [2, 1, 3, 5],
fill: 'tozeroy',
type: 'scatter',
fillcolor: 'red'
};
var data = [trace1];
Plotly.newPlot('myDiv', data);
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
<div id='myDiv'></div>
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744806067a4594782.html
评论列表(0条)