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

87
Vistas
Displaying Persian/Jalali dates in react apexchart

Could you guide me on how to make a "Datetime X-Axis" chart with react Apexchart.js when my dates are in Persian? at last, I should make a "brushChart" with Datetime X-Axis, if you have a similar project that can help me please send link of them

I had these codes below and I tried "defaultLocale" and "name" with both "Per" and "Fa" but none of them worked and getting a error and the app crashed.

chart: {
  id: 'reactchart-example',
  defaultLocale: 'Fa',
  locales: [
    {
      name: 'per',
      options: {
        months: [
          'دی',
          'بهمن',
          'اسفند',
          'فروردین',
          'اردیبهشت',
          'خرداد',
          'تیر',
          'مرداد',
          'شهریور',
          'مهر',
          'آبان',
          'آذر',
        ],
        shortMonths: ['دی', 'بهم', 'اسف', 'فرو', 'ارد', 'خرد', 'تیر', 'مرد', 'شهر', 'مهر', 'آبا', 'آذر'],
        days: ['یکشنبه', 'دوشنبه', 'سه شنبه', 'چهارشنبه', 'پنج شنبه', 'جمعه', 'شنبه'],
        shortDays: ['یک', 'دو', 'سه', 'چهار', 'پنج', 'جمع', 'شنب'],
        toolbar: {
          download: 'دانلود SVG',
          selection: 'انتخاب',
          selectionZoom: 'انتخاب بزرگنمایی',
          zoomIn: 'بزرگنمایی',
          zoomOut: 'کوچک نمایی',
          pan: 'جابجایی',
          reset: 'بازگرداندن',
        },
      },
    },
  ],
},

thanks for your help

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

you don't need to add the whole config in your chart object, there is a json file for every locale in this address in your node_modules folder: "apexcharts/dist/locales/"

all you need is to import your desired locale json file in your code like below

import fa from "apexcharts/dist/locales/fa.json"

and then simply set "locales" array and "defaultLocale" in the object "chart" like below:

chart: {
  //The following two lines are the key answer
  locales: [fa], //or multi language like [fa, en]
  defaultLocale: 'fa',
  
  //your other configs ...
},
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