Polar Chart in Higcharts 'negativeColor' not showing properly
I have this polar chart which is populated at every 2 sec with new data by a function.
What I want to achive:
Display line/area series, based on 120 values, for every 3º (in the img 'Layer1, 'Column for Layer 2' and 'Total' recive the 120 values while 'Line' has only 8 values for every 45º).
Every time a value passes a Limit ( I use 'threshold: 500,'), that point must be turn in to 'red' ( I set it with 'negativeColor')
My problem is:
- When the value is passed, it is not making the line red, just the point.
- It has this problem with the line ..... because if my values are under the down half of the circle it is not showing any line at all, just the points (It doesn't matter if it is a line, or arearange type series). Like this:
.
My code:
$(document).ready(
function(datt) {
chart = new Highcharts.chart('container', {
chart: {
polar: true,
zoomType: 'xy'
},
pane: {
startAngle: 0,
endAngle: 360
},
credits: {
enabled: false
},
title: {
text: 'Polar distribution of layers thickness '
},
tooltip: {
formatter: function() {
return this.series.name + ' WT: ' + JSON.stringify(this.y / 35.5).slice(0, 6);
}
},
xAxis: {
min: 0,
max: 360,
tickInterval: 45,
gridLineColor: 'white',
gridZIndex: 5,
labels: {
formatter: function() {
return this.value + " º";
}
}
},
yAxis: {
min: 0,
endOnTick: false,
visible: false,
maxPadding: 0,
labels: {
enabled: false
},
},
plotOptions: {
arearange: {
marker: {
enabled: false
}
}
},
series: [{
type: 'arearange',
name: 'Layer 1',
data: datt,
color: '#19dde8',
fillOpacity: 0.5,
lineWidth: 0.3,
zIndex: 2
},
{
type: 'arearange',
name: 'Column for Layer 2',
data: [
[0, 419, 419],
[45, 419, 419],
[90, 419, 419],
[135, 419, 419],
[180, 419, 419],
[225, 419, 419],
[270, 419, 419],
[315, 419, 419],
[360, 419, 419]
],
min: 400,
color: '#e8d618',
fillOpacity: 0.3,
lineWidth: 0.3,
threshold: 500,
negativeColor: 'red'
},
{
type: 'arearange',
name: 'Total',
data: [
[0, 451, 451],
[45, 451, 451],
[90, 451, 451],
[135, 451, 451],
[180, 451, 451],
[225, 451, 451],
[270, 451, 451],
[315, 451, 451],
[360, 451, 451]
],
lineWidth: 0.3,
color: '#c8c5f9',
fillOpacity: 0.5,
lineWidth: 0.3,
zIndex: 7,
},
{
type: 'line',
name: 'Line',
data: [
[0, 619],
[45, 639],
[90, 649],
[135, 659],
[180, 669],
[225, 639],
[270, 629],
[315, 699],
[360, 609]
],
lineWidth: 0.3,
color: 'orange',
threshold: 650,
negativeColor: 'red',
fillOpacity: 0.5,
lineWidth: 0.3,
zIndex: 7,
}
]
});
}
);
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/highcharts-more.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highcharts/6.2.0/es-modules/parts-more/Polar.js"></script>
<div id='container'></div>
javascript highcharts graphics
add a comment |
I have this polar chart which is populated at every 2 sec with new data by a function.
What I want to achive:
Display line/area series, based on 120 values, for every 3º (in the img 'Layer1, 'Column for Layer 2' and 'Total' recive the 120 values while 'Line' has only 8 values for every 45º).
Every time a value passes a Limit ( I use 'threshold: 500,'), that point must be turn in to 'red' ( I set it with 'negativeColor')
My problem is:
- When the value is passed, it is not making the line red, just the point.
- It has this problem with the line ..... because if my values are under the down half of the circle it is not showing any line at all, just the points (It doesn't matter if it is a line, or arearange type series). Like this:
.
My code:
$(document).ready(
function(datt) {
chart = new Highcharts.chart('container', {
chart: {
polar: true,
zoomType: 'xy'
},
pane: {
startAngle: 0,
endAngle: 360
},
credits: {
enabled: false
},
title: {
text: 'Polar distribution of layers thickness '
},
tooltip: {
formatter: function() {
return this.series.name + ' WT: ' + JSON.stringify(this.y / 35.5).slice(0, 6);
}
},
xAxis: {
min: 0,
max: 360,
tickInterval: 45,
gridLineColor: 'white',
gridZIndex: 5,
labels: {
formatter: function() {
return this.value + " º";
}
}
},
yAxis: {
min: 0,
endOnTick: false,
visible: false,
maxPadding: 0,
labels: {
enabled: false
},
},
plotOptions: {
arearange: {
marker: {
enabled: false
}
}
},
series: [{
type: 'arearange',
name: 'Layer 1',
data: datt,
color: '#19dde8',
fillOpacity: 0.5,
lineWidth: 0.3,
zIndex: 2
},
{
type: 'arearange',
name: 'Column for Layer 2',
data: [
[0, 419, 419],
[45, 419, 419],
[90, 419, 419],
[135, 419, 419],
[180, 419, 419],
[225, 419, 419],
[270, 419, 419],
[315, 419, 419],
[360, 419, 419]
],
min: 400,
color: '#e8d618',
fillOpacity: 0.3,
lineWidth: 0.3,
threshold: 500,
negativeColor: 'red'
},
{
type: 'arearange',
name: 'Total',
data: [
[0, 451, 451],
[45, 451, 451],
[90, 451, 451],
[135, 451, 451],
[180, 451, 451],
[225, 451, 451],
[270, 451, 451],
[315, 451, 451],
[360, 451, 451]
],
lineWidth: 0.3,
color: '#c8c5f9',
fillOpacity: 0.5,
lineWidth: 0.3,
zIndex: 7,
},
{
type: 'line',
name: 'Line',
data: [
[0, 619],
[45, 639],
[90, 649],
[135, 659],
[180, 669],
[225, 639],
[270, 629],
[315, 699],
[360, 609]
],
lineWidth: 0.3,
color: 'orange',
threshold: 650,
negativeColor: 'red',
fillOpacity: 0.5,
lineWidth: 0.3,
zIndex: 7,
}
]
});
}
);
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/highcharts-more.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highcharts/6.2.0/es-modules/parts-more/Polar.js"></script>
<div id='container'></div>
javascript highcharts graphics
I believe you have run into this open issue: github.com/highcharts/highcharts/issues/4936. You could try posting there with a minimalized example to point out that this is still an issue and thatnegativeColor
is not disabled for polar charts.
– ewolden
Nov 14 '18 at 10:40
It looks like... Many thanks!
– Jaquelline
Nov 14 '18 at 11:33
add a comment |
I have this polar chart which is populated at every 2 sec with new data by a function.
What I want to achive:
Display line/area series, based on 120 values, for every 3º (in the img 'Layer1, 'Column for Layer 2' and 'Total' recive the 120 values while 'Line' has only 8 values for every 45º).
Every time a value passes a Limit ( I use 'threshold: 500,'), that point must be turn in to 'red' ( I set it with 'negativeColor')
My problem is:
- When the value is passed, it is not making the line red, just the point.
- It has this problem with the line ..... because if my values are under the down half of the circle it is not showing any line at all, just the points (It doesn't matter if it is a line, or arearange type series). Like this:
.
My code:
$(document).ready(
function(datt) {
chart = new Highcharts.chart('container', {
chart: {
polar: true,
zoomType: 'xy'
},
pane: {
startAngle: 0,
endAngle: 360
},
credits: {
enabled: false
},
title: {
text: 'Polar distribution of layers thickness '
},
tooltip: {
formatter: function() {
return this.series.name + ' WT: ' + JSON.stringify(this.y / 35.5).slice(0, 6);
}
},
xAxis: {
min: 0,
max: 360,
tickInterval: 45,
gridLineColor: 'white',
gridZIndex: 5,
labels: {
formatter: function() {
return this.value + " º";
}
}
},
yAxis: {
min: 0,
endOnTick: false,
visible: false,
maxPadding: 0,
labels: {
enabled: false
},
},
plotOptions: {
arearange: {
marker: {
enabled: false
}
}
},
series: [{
type: 'arearange',
name: 'Layer 1',
data: datt,
color: '#19dde8',
fillOpacity: 0.5,
lineWidth: 0.3,
zIndex: 2
},
{
type: 'arearange',
name: 'Column for Layer 2',
data: [
[0, 419, 419],
[45, 419, 419],
[90, 419, 419],
[135, 419, 419],
[180, 419, 419],
[225, 419, 419],
[270, 419, 419],
[315, 419, 419],
[360, 419, 419]
],
min: 400,
color: '#e8d618',
fillOpacity: 0.3,
lineWidth: 0.3,
threshold: 500,
negativeColor: 'red'
},
{
type: 'arearange',
name: 'Total',
data: [
[0, 451, 451],
[45, 451, 451],
[90, 451, 451],
[135, 451, 451],
[180, 451, 451],
[225, 451, 451],
[270, 451, 451],
[315, 451, 451],
[360, 451, 451]
],
lineWidth: 0.3,
color: '#c8c5f9',
fillOpacity: 0.5,
lineWidth: 0.3,
zIndex: 7,
},
{
type: 'line',
name: 'Line',
data: [
[0, 619],
[45, 639],
[90, 649],
[135, 659],
[180, 669],
[225, 639],
[270, 629],
[315, 699],
[360, 609]
],
lineWidth: 0.3,
color: 'orange',
threshold: 650,
negativeColor: 'red',
fillOpacity: 0.5,
lineWidth: 0.3,
zIndex: 7,
}
]
});
}
);
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/highcharts-more.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highcharts/6.2.0/es-modules/parts-more/Polar.js"></script>
<div id='container'></div>
javascript highcharts graphics
I have this polar chart which is populated at every 2 sec with new data by a function.
What I want to achive:
Display line/area series, based on 120 values, for every 3º (in the img 'Layer1, 'Column for Layer 2' and 'Total' recive the 120 values while 'Line' has only 8 values for every 45º).
Every time a value passes a Limit ( I use 'threshold: 500,'), that point must be turn in to 'red' ( I set it with 'negativeColor')
My problem is:
- When the value is passed, it is not making the line red, just the point.
- It has this problem with the line ..... because if my values are under the down half of the circle it is not showing any line at all, just the points (It doesn't matter if it is a line, or arearange type series). Like this:
.
My code:
$(document).ready(
function(datt) {
chart = new Highcharts.chart('container', {
chart: {
polar: true,
zoomType: 'xy'
},
pane: {
startAngle: 0,
endAngle: 360
},
credits: {
enabled: false
},
title: {
text: 'Polar distribution of layers thickness '
},
tooltip: {
formatter: function() {
return this.series.name + ' WT: ' + JSON.stringify(this.y / 35.5).slice(0, 6);
}
},
xAxis: {
min: 0,
max: 360,
tickInterval: 45,
gridLineColor: 'white',
gridZIndex: 5,
labels: {
formatter: function() {
return this.value + " º";
}
}
},
yAxis: {
min: 0,
endOnTick: false,
visible: false,
maxPadding: 0,
labels: {
enabled: false
},
},
plotOptions: {
arearange: {
marker: {
enabled: false
}
}
},
series: [{
type: 'arearange',
name: 'Layer 1',
data: datt,
color: '#19dde8',
fillOpacity: 0.5,
lineWidth: 0.3,
zIndex: 2
},
{
type: 'arearange',
name: 'Column for Layer 2',
data: [
[0, 419, 419],
[45, 419, 419],
[90, 419, 419],
[135, 419, 419],
[180, 419, 419],
[225, 419, 419],
[270, 419, 419],
[315, 419, 419],
[360, 419, 419]
],
min: 400,
color: '#e8d618',
fillOpacity: 0.3,
lineWidth: 0.3,
threshold: 500,
negativeColor: 'red'
},
{
type: 'arearange',
name: 'Total',
data: [
[0, 451, 451],
[45, 451, 451],
[90, 451, 451],
[135, 451, 451],
[180, 451, 451],
[225, 451, 451],
[270, 451, 451],
[315, 451, 451],
[360, 451, 451]
],
lineWidth: 0.3,
color: '#c8c5f9',
fillOpacity: 0.5,
lineWidth: 0.3,
zIndex: 7,
},
{
type: 'line',
name: 'Line',
data: [
[0, 619],
[45, 639],
[90, 649],
[135, 659],
[180, 669],
[225, 639],
[270, 629],
[315, 699],
[360, 609]
],
lineWidth: 0.3,
color: 'orange',
threshold: 650,
negativeColor: 'red',
fillOpacity: 0.5,
lineWidth: 0.3,
zIndex: 7,
}
]
});
}
);
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/highcharts-more.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highcharts/6.2.0/es-modules/parts-more/Polar.js"></script>
<div id='container'></div>
$(document).ready(
function(datt) {
chart = new Highcharts.chart('container', {
chart: {
polar: true,
zoomType: 'xy'
},
pane: {
startAngle: 0,
endAngle: 360
},
credits: {
enabled: false
},
title: {
text: 'Polar distribution of layers thickness '
},
tooltip: {
formatter: function() {
return this.series.name + ' WT: ' + JSON.stringify(this.y / 35.5).slice(0, 6);
}
},
xAxis: {
min: 0,
max: 360,
tickInterval: 45,
gridLineColor: 'white',
gridZIndex: 5,
labels: {
formatter: function() {
return this.value + " º";
}
}
},
yAxis: {
min: 0,
endOnTick: false,
visible: false,
maxPadding: 0,
labels: {
enabled: false
},
},
plotOptions: {
arearange: {
marker: {
enabled: false
}
}
},
series: [{
type: 'arearange',
name: 'Layer 1',
data: datt,
color: '#19dde8',
fillOpacity: 0.5,
lineWidth: 0.3,
zIndex: 2
},
{
type: 'arearange',
name: 'Column for Layer 2',
data: [
[0, 419, 419],
[45, 419, 419],
[90, 419, 419],
[135, 419, 419],
[180, 419, 419],
[225, 419, 419],
[270, 419, 419],
[315, 419, 419],
[360, 419, 419]
],
min: 400,
color: '#e8d618',
fillOpacity: 0.3,
lineWidth: 0.3,
threshold: 500,
negativeColor: 'red'
},
{
type: 'arearange',
name: 'Total',
data: [
[0, 451, 451],
[45, 451, 451],
[90, 451, 451],
[135, 451, 451],
[180, 451, 451],
[225, 451, 451],
[270, 451, 451],
[315, 451, 451],
[360, 451, 451]
],
lineWidth: 0.3,
color: '#c8c5f9',
fillOpacity: 0.5,
lineWidth: 0.3,
zIndex: 7,
},
{
type: 'line',
name: 'Line',
data: [
[0, 619],
[45, 639],
[90, 649],
[135, 659],
[180, 669],
[225, 639],
[270, 629],
[315, 699],
[360, 609]
],
lineWidth: 0.3,
color: 'orange',
threshold: 650,
negativeColor: 'red',
fillOpacity: 0.5,
lineWidth: 0.3,
zIndex: 7,
}
]
});
}
);
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/highcharts-more.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highcharts/6.2.0/es-modules/parts-more/Polar.js"></script>
<div id='container'></div>
$(document).ready(
function(datt) {
chart = new Highcharts.chart('container', {
chart: {
polar: true,
zoomType: 'xy'
},
pane: {
startAngle: 0,
endAngle: 360
},
credits: {
enabled: false
},
title: {
text: 'Polar distribution of layers thickness '
},
tooltip: {
formatter: function() {
return this.series.name + ' WT: ' + JSON.stringify(this.y / 35.5).slice(0, 6);
}
},
xAxis: {
min: 0,
max: 360,
tickInterval: 45,
gridLineColor: 'white',
gridZIndex: 5,
labels: {
formatter: function() {
return this.value + " º";
}
}
},
yAxis: {
min: 0,
endOnTick: false,
visible: false,
maxPadding: 0,
labels: {
enabled: false
},
},
plotOptions: {
arearange: {
marker: {
enabled: false
}
}
},
series: [{
type: 'arearange',
name: 'Layer 1',
data: datt,
color: '#19dde8',
fillOpacity: 0.5,
lineWidth: 0.3,
zIndex: 2
},
{
type: 'arearange',
name: 'Column for Layer 2',
data: [
[0, 419, 419],
[45, 419, 419],
[90, 419, 419],
[135, 419, 419],
[180, 419, 419],
[225, 419, 419],
[270, 419, 419],
[315, 419, 419],
[360, 419, 419]
],
min: 400,
color: '#e8d618',
fillOpacity: 0.3,
lineWidth: 0.3,
threshold: 500,
negativeColor: 'red'
},
{
type: 'arearange',
name: 'Total',
data: [
[0, 451, 451],
[45, 451, 451],
[90, 451, 451],
[135, 451, 451],
[180, 451, 451],
[225, 451, 451],
[270, 451, 451],
[315, 451, 451],
[360, 451, 451]
],
lineWidth: 0.3,
color: '#c8c5f9',
fillOpacity: 0.5,
lineWidth: 0.3,
zIndex: 7,
},
{
type: 'line',
name: 'Line',
data: [
[0, 619],
[45, 639],
[90, 649],
[135, 659],
[180, 669],
[225, 639],
[270, 629],
[315, 699],
[360, 609]
],
lineWidth: 0.3,
color: 'orange',
threshold: 650,
negativeColor: 'red',
fillOpacity: 0.5,
lineWidth: 0.3,
zIndex: 7,
}
]
});
}
);
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/highcharts-more.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highcharts/6.2.0/es-modules/parts-more/Polar.js"></script>
<div id='container'></div>
javascript highcharts graphics
javascript highcharts graphics
edited Nov 14 '18 at 10:11
ewolden
4,12131125
4,12131125
asked Nov 14 '18 at 9:50
Jaquelline
1
1
I believe you have run into this open issue: github.com/highcharts/highcharts/issues/4936. You could try posting there with a minimalized example to point out that this is still an issue and thatnegativeColor
is not disabled for polar charts.
– ewolden
Nov 14 '18 at 10:40
It looks like... Many thanks!
– Jaquelline
Nov 14 '18 at 11:33
add a comment |
I believe you have run into this open issue: github.com/highcharts/highcharts/issues/4936. You could try posting there with a minimalized example to point out that this is still an issue and thatnegativeColor
is not disabled for polar charts.
– ewolden
Nov 14 '18 at 10:40
It looks like... Many thanks!
– Jaquelline
Nov 14 '18 at 11:33
I believe you have run into this open issue: github.com/highcharts/highcharts/issues/4936. You could try posting there with a minimalized example to point out that this is still an issue and that
negativeColor
is not disabled for polar charts.– ewolden
Nov 14 '18 at 10:40
I believe you have run into this open issue: github.com/highcharts/highcharts/issues/4936. You could try posting there with a minimalized example to point out that this is still an issue and that
negativeColor
is not disabled for polar charts.– ewolden
Nov 14 '18 at 10:40
It looks like... Many thanks!
– Jaquelline
Nov 14 '18 at 11:33
It looks like... Many thanks!
– Jaquelline
Nov 14 '18 at 11:33
add a comment |
1 Answer
1
active
oldest
votes
Unfortunately negativeColor property doesn't work properly in polar chart. As you can see it is reported and Highcharts core developer wrote: "As a short term solution, we must disable zones and negativeColor for polar charts, and specify that in the docs." https://github.com/highcharts/highcharts/issues/4936.
The solution which I can suggest for you is to use multicolor series Highcharts module http://blacklabel.github.io/multicolor_series/. Check this demo with a similar chart to yours: https://jsfiddle.net/Bastss/1c8mbu9e//
load() {
let chart = this;
chart.series.forEach((series) => {
if (series.userOptions.type != 'arearange') {
series.data.forEach((point) => {
if (point.y < 650) {
console.log(point)
point.update({
color: "red",
segmentColor: "red"
})
}
})
}
})
chart.reflow();
}
}
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53297258%2fpolar-chart-in-higcharts-negativecolor-not-showing-properly%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Unfortunately negativeColor property doesn't work properly in polar chart. As you can see it is reported and Highcharts core developer wrote: "As a short term solution, we must disable zones and negativeColor for polar charts, and specify that in the docs." https://github.com/highcharts/highcharts/issues/4936.
The solution which I can suggest for you is to use multicolor series Highcharts module http://blacklabel.github.io/multicolor_series/. Check this demo with a similar chart to yours: https://jsfiddle.net/Bastss/1c8mbu9e//
load() {
let chart = this;
chart.series.forEach((series) => {
if (series.userOptions.type != 'arearange') {
series.data.forEach((point) => {
if (point.y < 650) {
console.log(point)
point.update({
color: "red",
segmentColor: "red"
})
}
})
}
})
chart.reflow();
}
}
add a comment |
Unfortunately negativeColor property doesn't work properly in polar chart. As you can see it is reported and Highcharts core developer wrote: "As a short term solution, we must disable zones and negativeColor for polar charts, and specify that in the docs." https://github.com/highcharts/highcharts/issues/4936.
The solution which I can suggest for you is to use multicolor series Highcharts module http://blacklabel.github.io/multicolor_series/. Check this demo with a similar chart to yours: https://jsfiddle.net/Bastss/1c8mbu9e//
load() {
let chart = this;
chart.series.forEach((series) => {
if (series.userOptions.type != 'arearange') {
series.data.forEach((point) => {
if (point.y < 650) {
console.log(point)
point.update({
color: "red",
segmentColor: "red"
})
}
})
}
})
chart.reflow();
}
}
add a comment |
Unfortunately negativeColor property doesn't work properly in polar chart. As you can see it is reported and Highcharts core developer wrote: "As a short term solution, we must disable zones and negativeColor for polar charts, and specify that in the docs." https://github.com/highcharts/highcharts/issues/4936.
The solution which I can suggest for you is to use multicolor series Highcharts module http://blacklabel.github.io/multicolor_series/. Check this demo with a similar chart to yours: https://jsfiddle.net/Bastss/1c8mbu9e//
load() {
let chart = this;
chart.series.forEach((series) => {
if (series.userOptions.type != 'arearange') {
series.data.forEach((point) => {
if (point.y < 650) {
console.log(point)
point.update({
color: "red",
segmentColor: "red"
})
}
})
}
})
chart.reflow();
}
}
Unfortunately negativeColor property doesn't work properly in polar chart. As you can see it is reported and Highcharts core developer wrote: "As a short term solution, we must disable zones and negativeColor for polar charts, and specify that in the docs." https://github.com/highcharts/highcharts/issues/4936.
The solution which I can suggest for you is to use multicolor series Highcharts module http://blacklabel.github.io/multicolor_series/. Check this demo with a similar chart to yours: https://jsfiddle.net/Bastss/1c8mbu9e//
load() {
let chart = this;
chart.series.forEach((series) => {
if (series.userOptions.type != 'arearange') {
series.data.forEach((point) => {
if (point.y < 650) {
console.log(point)
point.update({
color: "red",
segmentColor: "red"
})
}
})
}
})
chart.reflow();
}
}
answered Nov 14 '18 at 10:59
Sebastian Wędzel
711
711
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53297258%2fpolar-chart-in-higcharts-negativecolor-not-showing-properly%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I believe you have run into this open issue: github.com/highcharts/highcharts/issues/4936. You could try posting there with a minimalized example to point out that this is still an issue and that
negativeColor
is not disabled for polar charts.– ewolden
Nov 14 '18 at 10:40
It looks like... Many thanks!
– Jaquelline
Nov 14 '18 at 11:33