Highchart: Remove left and right padding in column chart


Jonas Schade

I have an adjusted column chart pointPlacements, pointPaddingand groupPaddingan x-axis with a datetime and maxsum minvalues.

The expected behavior is to slice the chart at the minimum and maximum values ​​of the axis, but Highcharts seems to extend the x-axis to the right about half of each data interval to the left of these extreme values. ( see picture )

I tried everything I could find in the API Reference, but couldn't get rid of the extra space on the sides.

Things I've tried:
*set xAxis.minPadding/ xAxis.maxPaddingwith 0with and w/o startOnTick/ endOnTick
*set xAxis.ceiling/ x.axis.floorwith max/ minvalue
* set xAxis.marginto 0
*set instead of xAxis.softMaxand * use / in place of the x value in the data *set toxAxis.softMinxAxis.minxAxis.max
pointStartpointInterval
chart.spacing[0,0,0,0]

Fiddle : https://jsfiddle.net/d4rz572L/ _

pot

You need to set minand maxproperties correctly:

xAxis: [{
    type: "datetime",
    // pointRange = 1530792000000 - 1530770400000
    min: 1530748800000 + (21600000 / 2),
    max: 1530835200000 - (21600000 / 2)
}]

Live demo : https://jsfiddle.net/BlackLabel/8bqt1chn/

API Reference : https://api.highcharts.com/highcharts/series.column.pointRange

Related


Highchart: Remove left and right padding in column chart

Jonas Schade I have an adjusted column chart pointPlacements, pointPaddingand groupPaddingan x-axis with a datetime and maxsum minvalues. The expected behavior is to slice the chart at the minimum and maximum values of the axis, but Highcharts seems to extend

Highchart: Remove left and right padding in column chart

Jonas Schade I have an adjusted column chart pointPlacements, pointPaddingand groupPaddingan x-axis with a datetime and maxsum minvalues. The expected behavior is to slice the chart at the minimum and maximum values of the axis, but Highcharts seems to extend

Highchart: remove padding around column chart

Neil I have a Highcharts column chart that I would like to minimize. Just bars, no padding, no titles, no labels, etc. I've tried several settings of the api, but I can't seem to get rid of the 15px padding on the left and right sides of the built graph. My ch

Interval column adds left/right padding to Google Line Chart

Jorim van der Wingard I have an annoying problem. I am creating a google line chart with area intervals. Once the interval column is given, the role: 'interval'chart creates some sort of left and right border within my line graph. How can I get rid of it? Here

Interval column adds left/right padding to Google Line Chart

Jorim van der Wingard I have an annoying problem. I am creating a google line chart with area intervals. Once the interval column is given, the role: 'interval'chart creates some sort of left and right border within my line graph. How can I get rid of it? Here

Interval column adds left/right padding to Google Line Chart

Jorim van der Wingard I have an annoying problem. I am creating a google line chart with area intervals. Once the interval column is given, the role: 'interval'chart creates some sort of left and right border within my line graph. How can I get rid of it? Here

Interval column adds left/right padding to Google Line Chart

Jorim van der Wingard I have an annoying problem. I am creating a google line chart with area intervals. Once the interval column is given, the role: 'interval'chart creates some sort of left and right border within my line graph. How can I get rid of it? Here

Add padding to the left and right of a line/area chart

silver ring How can I add padding to the left and right of a line/area chart? My graph looks like this: Here's how it looks (padding/margin part): silver ring Inspired by The Wasteland's answer , but done in Javascript. Before back code element = document.getE

Add padding to the left and right of a line/area chart

silver ring How can I add padding to the left and right of a line/area chart? My graph looks like this: Here's how it looks (padding/margin part): silver ring Inspired by The Wasteland's answer , but done in Javascript. Before back code element = document.getE

Add padding to the left and right of a line/area chart

silver ring How can I add padding to the left and right of a line/area chart? My graph looks like this: Here's how it looks (padding/margin part): silver ring Inspired by The Wasteland's answer , but done in Javascript. Before back code element = document.getE

Add padding to the left and right of a line/area chart

silver ring How can I add padding to the left and right of a line/area chart? My graph looks like this: Here's how it looks (padding/margin part): silver ring Inspired by The Wasteland's answer , but done in Javascript. Before back code element = document.getE

Add padding to the left and right of a line/area chart

silver ring How can I add padding to the left and right of a line/area chart? My graph looks like this: Here's how it looks (padding/margin part): silver ring Inspired by The Wasteland's answer , but done in Javascript. Before back code element = document.getE

How to remove left and right padding of a list in SwiftUI?

FlowUI。SimpleUITesting.com: How to remove left and right padding of a list in SwiftUI? Every list I create has a border at the beginning and end of a cell. What modifier should I add to remove it? Tragically: .listRowInsetsIt doesn't seem to work with the line

How to remove left and right padding of a list in SwiftUI?

FlowUI。SimpleUITesting.com: How to remove left and right padding of a list in SwiftUI? Every list I create has a border at the beginning and end of a cell. What modifier should I add to remove it? Tragically: .listRowInsetsIt doesn't seem to work with the line

How to remove left and right padding of a list in SwiftUI?

FlowUI。SimpleUITesting.com: How to remove left and right padding of a list in SwiftUI? Every list I create has a border at the beginning and end of a cell. What modifier should I add to remove it? Tragically: .listRowInsetsIt doesn't seem to work with the line

Remove the padding on the left and right sides of the grid system

Reese E96 I have a grid system that pads 10px between columns. But I don't want that padding to the left and right of the entire grid. I tried putting the columns in a big package and adding margin-left: -10px and margin-right: -10px, but it just moves the gri

How to add left/right padding in Chart.js bar chart?

Max Best I want to add left and right padding to my Chart.js bar chart. I don't understand why only the first and half of the last are displayed: I tried to play with layout > paddingno success: layout: { padding: { left: 20 } } Code is available here

Remove left/right padding on col-md-6 bootstrap

username I have a site that utilizes Bootstrap, but I want to override the left and right padding only for col-md-6 columns (set them to 0px). Not sure what to do, my current setup is... CSS .fix-gutters > [class^="col-"], .fix-gutters > [class*=" col-"] { p

How to remove all left and right padding in html table cells?

Clay Shannon I'm creating a timeline with one column representing each year in the timeline; I want the year columns to be as "skinny" (not wide) as possible. Now they look like this: How to remove all left and right padding in cells between years? My current

Remove left/right padding on col-md-6 bootstrap

username I have a site that utilizes Bootstrap, but I want to override the left and right padding only for col-md-6 columns (set them to 0px). Not sure how to do it, my current setup is... CSS .fix-gutters > [class^="col-"], .fix-gutters > [class*=" col-"] {

How to remove left/right padding at line start/end?

Rudy Van Sloten I have a row of cards of a certain size with a gutter between them. The problem is that the gutter is also applied to both sides of each card at the start and end row. I need both start and end to be aligned with the border of the parent contai

Remove left/right padding on col-md-6 bootstrap

username I have a site that utilizes Bootstrap, but I want to override the left and right padding only for col-md-6 columns (set them to 0px). Not sure what to do, my current setup is... CSS .fix-gutters > [class^="col-"], .fix-gutters > [class*=" col-"] { p

Remove left/right padding on col-md-6 bootstrap

username I have a site that utilizes Bootstrap, but I want to override the left and right padding only for col-md-6 columns (set them to 0px). Not sure what to do, my current setup is... CSS .fix-gutters > [class^="col-"], .fix-gutters > [class*=" col-"] { p

How to remove all left and right padding in html table cells?

Clay Shannon I'm creating a timeline with one column representing each year in the timeline; I want the year columns to be as "skinny" (not wide) as possible. Now they look like this: How to remove all left and right padding in cells between years? My current

How to remove all left and right padding in html table cells?

Clay Shannon I'm creating a timeline with one column representing each year in the timeline; I want the year columns to be as "skinny" (not wide) as possible. Now they look like this: How to remove all left and right padding in cells between years? My current

How to remove default left and right padding in react native

Satyam Tripathi text image. I want to remove the left and right padding of the forgotten password Text. please help import React, { useState } from "react" import { View, Text, SafeAreaView, Button, StyleSheet, TextInput, TouchableOpacity, Platform } from

Remove left/right padding on col-md-6 bootstrap

username I have a site that utilizes Bootstrap, but I want to override left and right padding for col-md-6 columns only (set them to 0px). Not sure what to do, my current setup is... CSS .fix-gutters > [class^="col-"], .fix-gutters > [class*=" col-"] { paddi