Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

175
Visualizações
Remove points from the axis that were not added to the series

I am using a library to generate timeline charts. In some knocks, I add a series of dots with voids to the scale. For example, I attach a screenshot.

screenshot-chart-with-voids

The screenshot shows that there are points for the time intervals from 6:30 PM to 23:59 PM. And the rest of the time is empty, there are no points for this time. I need the x-axis to exclude these points from its surface.

To form the axis, I use

this.chart
  .getDefaultAxisX()
  .setTickStrategy(
     AxisTickStrategies.DateTime,
     (tickStrategy: DateTimeTickStrategy) => tickStrategy
        .setDateOrigin(this.originDate)
  );

Unfortunately, in the documentation, I have not yet found an opportunity to specify any flag like (tickStrategy: DateTimeTickStrategy) => tickStrategy.eliminateVoids()

As a way out, I see one solution so far. Do not use the standard axis sweep strategy, but make your own custom one. .addCustomTick(UIElementBuilders.AxisTick) This is how to add custom ticks, and try to specify labels for each point on the axis yourself. But it looks like hard labor, is there an easier solution?

P.S. My question is most likely similar to something like this -> R: Way to Remove Names on X Axis That Were Not Plotted (Leaving Names That Were)?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

In LightningChart JS v.3.2 there is indeed no features for managing gaps in data (in rendering or on axis ticks), as you have found out.

The existing automatic tick placement logic has very little modification logic for the placement of ticks for simplicity. I believe the first official solution to this problem case would have to be support for specifying gaps in data which would reflect in both rendering and axis ticks placement. However, this is not an actively prioritized issue for us, unfortunately.

We do, however, have an example on managing ticks manually in a scrolling application. Please find it here. This is indeed extra labor, but at least it should be much easier with a reference code available.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda