score:27
Yes, you can use minPointLength: http://api.highcharts.com/highstock#plotOptions.column.minPointLength
Unless the average viewer of this data is accustomed to working with log-scaled data, it is not a good idea to scale it that way. People will compare the length of the bars, as they should, and will have a completely unrealistic impression of the data.
The difference between 1 pixel and 0 pixels will be enough to show that there is a value there, but will not be enough to skew the data in any meaningful way, in most cases.
score:1
I resolved this like following
events: {
load: function(event) {
// Following code is added to make tiny stack visible
var chart = this;
var totalValue = 82870; // Sum of all stacks
var minimumPercentageValue = 0.8;
this.series.forEach(function(series) {
series.points.forEach(function(point) {
var valueInPercentage = (point.y * 100) / totalValue;
if (valueInPercentage < minimumPercentageValue) {
point.update({
y: ((minimumPercentageValue+valueInPercentage)*totalValue)/100,
realValue: point.y
}, false);
}
});
});
this.redraw();
}
}
var chart = Highcharts.chart('chart-container', {
credits: false,
chart: {
type: 'bar',
animation:false,
height:200,
events: {
load: function(event) {
// Following code is added to make tiny stack visible
var chart = this;
var totalValue = 82870; // Sum of all stacks
var minimumPercentageValue = 0.8;
this.series.forEach(function(series) {
series.points.forEach(function(point) {
var valueInPercentage = (point.y * 100) / totalValue;
if (valueInPercentage < minimumPercentageValue) {
point.update({
y: ((minimumPercentageValue+valueInPercentage)*totalValue)/100,
realValue: point.y
}, false);
}
});
});
this.redraw();
}
}
},
title:{
text:"Shifts"
},
xAxis: {
visible:false,
endOnTick:false,
categories: ['Shifts'],
},
yAxis: {
endOnTick:false,
visible:false,
max: 82870,
},
legend: {
reversed: true,
align: 'left',
padding:0,
itemPaddingBottom:15,
itemMarginBottom:5,
symbolRadius:0,
verticalAlign: 'bottom',
floating: true,
itemMarginBottom:5,
useHTML: true,
labelFormatter: function (params) {
return '<div><div>'+this.name+'</div><div style="font-weight:normal">'+this.userOptions.start_time+'</div><div style="font-weight:normal">'+this.userOptions.end_time+'</div></div>';
}
},
plotOptions: {
series: {
stacking: 'normal',
pointWidth: 50,
pointPlacement:'on',
states: {
hover: {
enabled: false
},
inactive: {
opacity: 1
},
marker: {
enabled: false
}
}
},
},
series: [{"name":"Shift 1","start_time":"12\/06\/2019 05:46:47 PM","end_time":"13\/06\/2019 02:47:46 PM","data":[75659]},{"name":"Break","start_time":"03\/06\/2019 03:42:11 PM","end_time":"03\/06\/2019 03:42:31 PM","data":[20]},{"name":"Shift 2","start_time":"03\/06\/2019 03:41:39 PM","end_time":"03\/06\/2019 03:42:11 PM","data":[32]},{"name":"Shift 3","start_time":"29\/05\/2019 08:17:32 PM","end_time":"29\/05\/2019 10:14:43 PM","data":[7031]},{"name":"Shift 4","start_time":"29\/05\/2019 08:16:32 PM","end_time":"29\/05\/2019 08:17:32 PM","data":[60]},{"name":"Shift 5","start_time":"29\/05\/2019 08:15:24 PM","end_time":"29\/05\/2019 08:16:32 PM","data":[68]}],
});
<script src="https://code.highcharts.com/highcharts.js"></script>
<div id="chart-container" style="height:400px; width:100%" ></div>
score:2
One thing you could consider is using a logarithmic scale:
http://www.highcharts.com/demo/line-log-axis
yAxis: {
type: 'logarithmic'
},
That would allow you to visualize the different heights even if one bar was several orders of magnitude greater than the others.
Anything else would be skewing your data if it really is so small that it can't be seen when you plot it initially.
Source: stackoverflow.com
Related Query
- Trying to set a minimum height on bars in HighStock
- How to set minimum height of data element of series in stacked bar chart?
- highcharts, Set minimum height for stacked column chart?
- How to set a minimum range in highstock navigator?
- Strange character in the Highstock source code
- How to set a minimum column height or range so that values in a stackedcolumn do not overlap?
- How do I set a minimum upper bound for an axis in Highcharts?
- How to set a static minimum value for axes in Highcharts
- Highcharts set legend height
- how to set a rangeSelector for highstock
- How to set plot area width and height in Highcharts?
- Highcharts Bar Chart - How to set the minimum bar width/length
- How to set xAxis minimum and maximum values on Highstock?
- HighCharts Funnel - Set minimum size of each section
- Highchart / Highstock how to set color of individual ohlc or candle?
- Highcharts, set legend height dynamically
- How to show plotlines on highstock when its set much higher than the data series?
- Highstock Time series with uneven data set distrubition
- Set background color for only one pane in multi-pane Highstock chart
- Set position for each flag in highstock
- Highstock flag position not correct for yAxis with top set
- Reset / Set ZoomType Control in Highstock
- Set minimum data interval for y axes on Highcharts
- using Highcharters in R with Shiny, control highstock chart height failed
- Wrong data display when i set multiple series type in highstock chart
- Cannot set Individual Point color in Series for Highstock API, it works for Highchart API
- Trying to set xAxis extremes using highcharts-vue wrapper
- How can I set navigator's start&end in Highstock candlestick chart?
- Set equal height for funnel highcharts
- Highcharts Gantt - Set max height and scrollbar on yAxis
More Query from same tag
- Highcharts - How to get Max and Min value between 2 dates
- Highcharts Marimekko chart refresh
- How to align the legends in reactjs Highcharts
- Highcharts callback function / handle datalabels and stacklabels
- Highcharts range selector doesn'n work
- HighCharts - set minimum Tick Interval
- Highchart 3D module is not working in angular 9.1.4
- How to use highcharts with princeXML?
- HighCharts graphics not working on Internet Explorer
- How to remove empty axis ticks in Highcharts?
- HighCharts pointRange trancating width. Is this a HighCharts bug or am I missing something?
- Highcharts convert x-axis time to localtime
- Highcharter shiny events - Returning multiple selected points to a dataframe
- How to position Highcharts tooltip on top of bar or at 0 line of Y-axis for negative value
- How to display raw decimal numbers on tooltips in Highcharts.js
- Best way to automatically generate highcharts image
- Highcharts to present in an HTML Table
- Remove spacing on a HighChart graph?
- Highcharts Default Colors Are Not Same at Pie and Column?
- Highcharts x-range datetime not shwoing with "Date.UTC(2023, 6, 20)"
- Get highcharts chart column position
- Highcharts:add click event on data label for pie chart
- Highcharts - spider web chart questions
- Combining gantt chart and line chart using highchart
- Highcharts - change border of a single data point in series
- JS HighCharts.js Pie data undefined error in code
- Tooltip doesn't appearing for overlapping datapoints in highchart xrange
- drilldown chart in Highcharts changes back button
- Change yAxis values in Compare multiple series highstock for showing point value instead of percentage change value
- Set HighCharts marginTop dynamically based on mobile device screen size