Graph multicolor area line [closed]
i need to create graph as showed on image.
One line with color filled area,
if point value is more than zero than color of line and area is green, else red.
How can i do this? JS (some plugin?) or PHP (imagick, gd)
charts highcharts area
closed as off-topic by ewolden, Suraj Rao, Vadim Kotov, AdrianHHH, Unheilig Nov 12 '18 at 9:53
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – ewolden, AdrianHHH
add a comment |
i need to create graph as showed on image.
One line with color filled area,
if point value is more than zero than color of line and area is green, else red.
How can i do this? JS (some plugin?) or PHP (imagick, gd)
charts highcharts area
closed as off-topic by ewolden, Suraj Rao, Vadim Kotov, AdrianHHH, Unheilig Nov 12 '18 at 9:53
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – ewolden, AdrianHHH
Disclamer: I'm image-charts founder ( image-charts.com) . If you need to generate an image of a line graph, it's simple as a URL: image-charts.com/…
– FGRibreau
Nov 15 '18 at 12:41
add a comment |
i need to create graph as showed on image.
One line with color filled area,
if point value is more than zero than color of line and area is green, else red.
How can i do this? JS (some plugin?) or PHP (imagick, gd)
charts highcharts area
i need to create graph as showed on image.
One line with color filled area,
if point value is more than zero than color of line and area is green, else red.
How can i do this? JS (some plugin?) or PHP (imagick, gd)
charts highcharts area
charts highcharts area
asked Nov 12 '18 at 8:54
Roman HuliakRoman Huliak
11
11
closed as off-topic by ewolden, Suraj Rao, Vadim Kotov, AdrianHHH, Unheilig Nov 12 '18 at 9:53
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – ewolden, AdrianHHH
closed as off-topic by ewolden, Suraj Rao, Vadim Kotov, AdrianHHH, Unheilig Nov 12 '18 at 9:53
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – ewolden, AdrianHHH
Disclamer: I'm image-charts founder ( image-charts.com) . If you need to generate an image of a line graph, it's simple as a URL: image-charts.com/…
– FGRibreau
Nov 15 '18 at 12:41
add a comment |
Disclamer: I'm image-charts founder ( image-charts.com) . If you need to generate an image of a line graph, it's simple as a URL: image-charts.com/…
– FGRibreau
Nov 15 '18 at 12:41
Disclamer: I'm image-charts founder ( image-charts.com) . If you need to generate an image of a line graph, it's simple as a URL: image-charts.com/…
– FGRibreau
Nov 15 '18 at 12:41
Disclamer: I'm image-charts founder ( image-charts.com) . If you need to generate an image of a line graph, it's simple as a URL: image-charts.com/…
– FGRibreau
Nov 15 '18 at 12:41
add a comment |
1 Answer
1
active
oldest
votes
You can use Highcharts area series type and define negativeColor
for it. Check the docs and example posted below.
HTML:
<script src="https://code.highcharts.com/highcharts.js"></script>
<div id="container"></div>
JS:
Highcharts.chart('container',
chart:
type: 'area'
,
series: [
color: 'rgba(0, 255, 0, 0.7)',
negativeColor: 'rgba(255, 0, 0, 0.7)',
fillOpacity: 0.2,
marker:
enabled: false
,
data: [5, 3, 4, 7, 2, -3, -5, -2, -7, -4, 0, 3, 4, 2, 5, 1]
]
);
Demo:
https://jsfiddle.net/BlackLabel/xa91d8o7/4/
Docs:
https://www.highcharts.com/demo/area-negative
https://api.highcharts.com/highcharts/series.area
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can use Highcharts area series type and define negativeColor
for it. Check the docs and example posted below.
HTML:
<script src="https://code.highcharts.com/highcharts.js"></script>
<div id="container"></div>
JS:
Highcharts.chart('container',
chart:
type: 'area'
,
series: [
color: 'rgba(0, 255, 0, 0.7)',
negativeColor: 'rgba(255, 0, 0, 0.7)',
fillOpacity: 0.2,
marker:
enabled: false
,
data: [5, 3, 4, 7, 2, -3, -5, -2, -7, -4, 0, 3, 4, 2, 5, 1]
]
);
Demo:
https://jsfiddle.net/BlackLabel/xa91d8o7/4/
Docs:
https://www.highcharts.com/demo/area-negative
https://api.highcharts.com/highcharts/series.area
add a comment |
You can use Highcharts area series type and define negativeColor
for it. Check the docs and example posted below.
HTML:
<script src="https://code.highcharts.com/highcharts.js"></script>
<div id="container"></div>
JS:
Highcharts.chart('container',
chart:
type: 'area'
,
series: [
color: 'rgba(0, 255, 0, 0.7)',
negativeColor: 'rgba(255, 0, 0, 0.7)',
fillOpacity: 0.2,
marker:
enabled: false
,
data: [5, 3, 4, 7, 2, -3, -5, -2, -7, -4, 0, 3, 4, 2, 5, 1]
]
);
Demo:
https://jsfiddle.net/BlackLabel/xa91d8o7/4/
Docs:
https://www.highcharts.com/demo/area-negative
https://api.highcharts.com/highcharts/series.area
add a comment |
You can use Highcharts area series type and define negativeColor
for it. Check the docs and example posted below.
HTML:
<script src="https://code.highcharts.com/highcharts.js"></script>
<div id="container"></div>
JS:
Highcharts.chart('container',
chart:
type: 'area'
,
series: [
color: 'rgba(0, 255, 0, 0.7)',
negativeColor: 'rgba(255, 0, 0, 0.7)',
fillOpacity: 0.2,
marker:
enabled: false
,
data: [5, 3, 4, 7, 2, -3, -5, -2, -7, -4, 0, 3, 4, 2, 5, 1]
]
);
Demo:
https://jsfiddle.net/BlackLabel/xa91d8o7/4/
Docs:
https://www.highcharts.com/demo/area-negative
https://api.highcharts.com/highcharts/series.area
You can use Highcharts area series type and define negativeColor
for it. Check the docs and example posted below.
HTML:
<script src="https://code.highcharts.com/highcharts.js"></script>
<div id="container"></div>
JS:
Highcharts.chart('container',
chart:
type: 'area'
,
series: [
color: 'rgba(0, 255, 0, 0.7)',
negativeColor: 'rgba(255, 0, 0, 0.7)',
fillOpacity: 0.2,
marker:
enabled: false
,
data: [5, 3, 4, 7, 2, -3, -5, -2, -7, -4, 0, 3, 4, 2, 5, 1]
]
);
Demo:
https://jsfiddle.net/BlackLabel/xa91d8o7/4/
Docs:
https://www.highcharts.com/demo/area-negative
https://api.highcharts.com/highcharts/series.area
answered Nov 12 '18 at 9:36
Wojciech ChmielWojciech Chmiel
1,285129
1,285129
add a comment |
add a comment |
Disclamer: I'm image-charts founder ( image-charts.com) . If you need to generate an image of a line graph, it's simple as a URL: image-charts.com/…
– FGRibreau
Nov 15 '18 at 12:41