Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

103
Views
Amcharts 4 gridIntervals into json not working

I use config for creating chart. But if I write gridIntervals in config it's not working. If I set gridIntervals manually it works.

config doesn't work

xAxes: [
    {
        type: 'DateAxis',
        renderer: {
            labels: {
                template: {
                    location: 0.5,
                    fill: '#666666',
                    fontSize: 12,
                },
            },
            grid: {
                template: {
                    strokeWidth: 0,
                },
            },
            axisFills: {
                template: {
                    fillOpacity: 0,
                    disabled: false
                },
            },
        },
        fillRule: (dataItem: DateAxisDataItem) =>
            (dataItem.axisFill.visible = true),
        gridIntervals: [
            {
                timeUnit: 'hour',
                count: 1,
            },
        ],
        periodChangeDateFormats: {
            hour: 'HH:mm',
        },
    },
],

creating chart

this.chart = am4core.createFromConfig(config, this.chartContainerEl.nativeElement);

this is work

this.chart.xAxes.values[0].gridIntervals.setAll([
                    { timeUnit: "hour", count: 1 }
                ])

What I do wrong?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!