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

159
Views
why React chartjs options dont apply to a chart?

I have been trying to do a inverted line chart with react chartjs but it seems that none of the parameter "option" doesn't run at all, but all the other parameters works fine.

import React from 'react'
import { Line } from 'react-chartjs-2'

export function Sales(){
  let data = {
    labels: [
      'Jan',
      'Feb',
      'Mar',
      'Apr',
      'May'
    ],
    datasets:[
      {
        label: 'Sales for 2022',
        data:[8, 5, 3, 20, 1],
        borderColor: ['rgb(25, 208, 200)'],
        
      }
    ],
  }

  const options = { 
    scaleShowGridLines : false,
    scales: { 
      yAxes: [{ 
        ticks: { 
          reverse: true
        } 
      }],
    } 
  }
  
 
  return(
    <div>
      <Line data={data} options={options}/>
    </div>
  )
}
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!