question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to create line chart with different intervals on X axis?

See original GitHub issue

Hi! I need to create Line chart with different intervals on X axis, for example

graph

. Is it possible?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
mkbrencommented, Feb 8, 2019

@esomkin the axis objects provide a format() function you can use to build your own interval behavior. you can try passing into your chart properties something like:

chartProps.axisBottom.format = x => axisBottomFormatFunc(x);

the format() function exposes the x value being handled, and is called for each x value of your dataset. axisBottomFormatFunc is whatever logic you want to perform, maybe a counter or calculation determining which values you want to display and which you want to suppress. just return null for intervals you want to skip

0reactions
esomkincommented, Feb 26, 2019

@esomkin, does the reply from @mkbren helped? is this issue still relevant?

@plouc Hi, issue is not relevant more

Read more comments on GitHub >

github_iconTop Results From Across the Web

Change the scale of the horizontal (category) axis in a chart
To change the interval between axis labels, under Interval between labels, click Specify interval unit, and then in the text box, type the...
Read more >
How to Change the Intervals on an X-Axis in Excel
Click on the radio button next to "Specify interval unit," then place your cursor into the small text box next to the button....
Read more >
combining two line charts with different x axis intervals
I try to get two line charts in the same graph, but they have different x axis intervals. Is this possible? For better...
Read more >
Changing the interval values on line chart x-axis - Super User
Once you have created your scatter plot, you can right-click the x-axis and select Format Axis . There you can set the min...
Read more >
A Complete Guide to Line Charts | Tutorial by Chartio
On the vertical axis, you will report the value of a second numeric variable for points that fall in each of the intervals...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found