Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

185
Vistas
How to remove decimal values on x-axis of bar chart : Highcharts

I am having trouble setting integer only values to the x-axis of the bar chart. Can someone help me as to how to solve this.

This is my sandbox: https://codesandbox.io/s/react-line-chart-forked-0409lk?file=/src/LineChart.js

Have tried, allowDecimal: false, min:0, float:0. Nothing worked out.

Help is appreciated

import * as React from "react";
import Highcharts from "highcharts";
import HighchartsReact from "highcharts-react-official";
import HC_exporting from "highcharts/modules/exporting";
HC_exporting(Highcharts);

function Chart(props) {
  const chartOptions = {
    chart: {
      type: "bar",
      height: 250
    },
    xAxis: {
      type: "category",
      visible: true,
      gridLineWidth: 1,
      floor: 0,
      tickInterval: 1,
      min: 0
    },
    yAxis: {
      min: 0,
      title: {
        text: null
      }
    },
    plotOptions: {
      column: {
        dataLabels: {
          enabled: true,
          crop: false,
          overflow: "none"
        }
      }
    },
    series: [{ data: props.chartData }]
  };
  return <HighchartsReact highcharts={Highcharts} options={chartOptions} />;
}

export default Chart;
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You should put the tickInterval: 1, in the yAxis

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda