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

177
Views
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 answers
Answer question

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 Report
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!