How to turn off inner padding in highcharts? - highcharts

I need to align table with highcharts, but chart has irregular padding on the edges, it's based on percentage, I guess.
I would like 30 to stick to the left edge of chart (close to 3) or set it distance manually in pixels. How can I do that in highcharts?

Based on #SebastianBochan suggestions, this is complete solution
xAxis:
startOnTick: true
endOnTick: true
minPadding: 0
maxPadding: 0

Try something like this:
yAxis: {
offset: -15
},
Check this fiddle: http://jsfiddle.net/jcxfhkht/

Related

Highcharts Heatmap Set Column Width

I'm trying to change the size of a column in a heatmap. I can use the colsize to set the width of the border, but i'd like to change the width of the entire column. Is this possible?
Here's a JS fiddle example.
http://jsfiddle.net/8b9410om/
The Total column I would like to change to the same size at the border that you can see around it
You can use endOnTick and pointPlacement properties:
xAxis: {
...,
max: 1.25,
endOnTick: false
},
series: [...,
{
colsize: 0.25,
pointPlacement: -1.5,
...
}
]
Live demo: http://jsfiddle.net/BlackLabel/t3r12hnk/
API Reference:
https://api.highcharts.com/highcharts/series.heatmap.pointPlacement
https://api.highcharts.com/highcharts/xAxis.max

How to prevent bars overlapping eachother in Highcharts?

HIGH CHARTS
Please look at JSFIDDLE. Here the bars overlap each other. How to prevent this by resizing the bar width dynamically.
If happens because you set bar width with fixed value. If you want bars to take all available place for width, instead of using pointWidth, set pointPadding to 0, groupPadding to 0 and borderWidth to 0.
API Reference:
http://api.highcharts.com/highcharts/plotOptions.bar.pointPadding
http://api.highcharts.com/highcharts/plotOptions.bar.groupPadding
http://api.highcharts.com/highcharts/plotOptions.bar.borderWidth
Example:
http://jsfiddle.net/yek6g5vy/
If possible remove container inline css height.
Fiddle Demo
Or you can use scrollbar using highstock.js
xAxis: {
categories: ['First', 'Second', 'Third', 'Fourth', 'Fifth', 'sixth', 'seventh'],
allowDecimals: false,
min: 0,
max: 4,
scrollbar: {
enabled: true
},
},
Fiddle demo

How to remove tick lines from secondary y axis in highcharts heatmap graph

I have manipulated highcharts heatmap graph to suit some of my requirement. But I am not able to hide the tick lines on secondary y axis. Below is the jsfiddle link of what I have done. http://jsfiddle.net/sandeepkparashar/39xBU/389/389
Please suggest how to hide the tick lines.
Actually, those lines are grid lines and an axis line (the one in the bottom). You can disable them by setting their width to 0.
xAxis: {
lineWidth: 0
...
},
yAxis: {
gridLineWidth: 0,
...
}
example: http://jsfiddle.net/sebdom/39xBU/390/

xAxis startOnTick and endOnTick options ignored on boxplots

It seems that the options startOnTick, and endOnTick have no effect on a boxplot. Is there anyway to align the outermost ticks to the graph edge with a boxplot?
xAxis: {
startOnTick: true,
endOnTick: true,
min: -1,
max: 6,
},
I have tried adding most combinations of minPadding/maxPadding, tickmarkPlacement: between/on, and manually setting ticks with tickPositioner without any luck. The only workaround I have is to shrink min/max so the padding fixes itself. I would prefer a better solution, because this workaround becomes very ugly for dynamic data.
Here is the fiddle demo demonstrating the problem and another with the workaround. Again, is there any way to align the outermost ticks to the graph edge with a boxplot?
Looking into this led me to these comments buried in parts/Axis.js.
if (!axis.single) {
// minPointOffset is the value padding to the left of
// the axis in order to make room for points with a
// pointRange, typically columns. When the
// pointPlacement option is 'between' or 'on', this
// padding does not apply.
minPointOffset = Math.max(
minPointOffset,
isString(pointPlacement) ? 0 : seriesPointRange / 2
);
// Determine the total padding needed to the length of
// the axis to make room for the pointRange. If the
// series' pointPlacement is 'on', no padding is added.
pointRangePadding = Math.max(
pointRangePadding,
pointPlacement === 'on' ? 0 : seriesPointRange
);
}
The issue is caused by the point padding and probably occurs on any column style plot. The padding will be ignored if pointPlacement is set to 'on' or 'between' on the series.
series: {
type: 'boxplot',
pointPlacement: 'on',
data: ...
}
Here is the working fiddle.

To reduce the height of highchart

i want to reduce the height of the highchart .Please the see the image below.actually i need my chart from -0.5 to 3 yaxis .can you help to reduce?
Try something like this:
yAxis: {
min: 0.5,
max: 3.0,
startOnTick: false
},
Try to set:
maxPadding: 0
Reference.

Resources