I am wondering if it is possible to make only specific points in a series transparent.
I would really appreciate your time and help. Thanks.
Update
As per your comment, you need to add connectNull in plotOption :
plotOptions: {
series: {
connectNulls:true
}
}
and set all you points with 0(zero) values with "Null"
var chart = $('#container').highcharts();
$.each(chart.series[0].data, function(i, point){
if(point.y == 0)
{
chart.series[0].data[i].update(null);
}
});
See the fiddle here
Old
If you want to set transparent color in specific bar ,pie-slice or column , you may set color and opacity as following
color: 'rgba(x,y,z, 0.4)'
xyz are RGB and opacity see below code and Fiddle here ,it has dark blue column transparent.
series: [{
name: 'Tokyo',
color: 'rgba(0,0,255, 0.4)', //this
data: [49.9, 71.5, 106.4, 129.2, 144.0, 176.0]
}
In area charts etc ,color gradient with stops can also be shown to show gradient .
Related
I have a Gantt Chart with a Navigator bar at the bottom that look like this:
The image as you can see is hard to read because of the color of the milestones... my question is, how do we get a white border on each of these milestones... I tried on almost everything the docs say, on series, datalabels, etc and I can't make any border show, thank you for any help you may bring.
You just need to specify borderWidth and borderColor properties for the specific data points:
Highcharts.ganttChart('container', {
series: [{
...,
data: [
...,
{
...,
borderWidth: 2,
borderColor: 'black'
}]
}],
...
});
Live demo: https://jsfiddle.net/BlackLabel/xps2d6z3/
API Reference:
https://api.highcharts.com/gantt/series.gantt.borderWidth
https://api.highcharts.com/gantt/series.gantt.borderColor
Please take a look at JSFIDDLE. Here, the green bar doesn't display any value. I know adding overflow:"none", crop:false will display the value. But it goes out of plotting area, sometimes for larger numbers it overlaps title. I would like to get green bar value (ONLY) inside the bar instead of hiding the value.
For particular column (i.e green column) label value to be inside, you can add attribute inside: true in data .Refer dataLabels.inside for more info
series: [{
color: colors[0],
showInLegend: false,
data: [{
....//first value
, {
y: 3500,
name: 'Second',
color: colors[1],
dataLabels: {
inside: true //labels will be inside column
}
},... // third and remaining
});
Fiddle demonstration
I want to be able to toggle colors on and off Points in a Highcharts pie chart.
Here's the sequence of operations
First I will render the chart
Next I will update the series.point color using point.update
this.chart.series[0].points[0].update({color: 'red'});
Then I want to unset the color I applied in step 2
Aside from caching the original color. I have tried
this.chart.series[0].points[0].update({color: void 0});
this.chart.series[0].points[0].update({color: null});
I've tested that this works on on series.update, such as
this.chart.series[0].update({color: void 0})
How can I unset the color on Point?
Currently my workaround is to redraw the whole chart! Feel like this might be a bug in Highcharts.
Fiddle demo to show steps as required
// Initiate the chart
var chart = Highcharts.chart('container', {
chart: {
type: 'pie',
},
series: [{
name: 'Installation',
data: [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175]
}]
});
// function for update color
function update() {
chart.series[0].points[0].update({
color: 'red'
});
};
// function for unset color
function unsetColor() {
chart.series[0].points[0].update({
color: Highcharts.Color(Highcharts.getOptions().colors[0]).input
});
}
Do anyone know which setting in hightcharts can change the width that marked with red arrow as example?
Please take a look at the image below
I want to set the width of the red arrow as example
You are using categories, so axis is divided evenly between all existing categories. In other words, you can simply remove unnecessary categories, for example: http://jsfiddle.net/mwqto4n6/
$('#container').highcharts({
xAxis: {
categories: ["2016", "2025"]
},
series: [{
type: 'column',
data: [200, 120]
}]
});
Is there a way to add a second needle of a different colour to a VU Meter ('gauge') style chart in Highcharts? I know that you can change the colour of the needle per chart using plotOptions:gauge:dial e.g.
plotOptions: {
gauge: {
dial: {
radius: '100%',
backgroundColor : 'grey'
}
}
}
and I have tried to overlay a second pane and specify individual plotOptions (as per this fiddle (http://jsfiddle.net/jdalton/xfV5k/8/) but without any success
You can use the same options as in plotOptions directly in series:
series: [{
data: [{y:-6, color: 'red'}],
yAxis: 0,
dial: {
backgroundColor : 'red'
}
}
Example: http://jsfiddle.net/xfV5k/11/