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.

[Feature] Line style for varied segments and connectNulls

See original GitHub issue

What problem does this feature solve?

Current API lacks the ability to control line style for varied segments. For example, if we want to make different styles for a line series, we have to mock it using many series, which is not an elegant way to do.

052a24de686d38783a9723dbb

What does the proposed API look like?

The new option should give the developer the control over line styles for different line segments. The API could be:

{
  data: [{
    value: 10,
    lineStyle: {...}, // controls the line style after this data
    areaStyle: {...}
  }]
}

or something similar to visualMap.pieces:

{
  linePieces: [{
    index: [0, 2, 4], // the index of line segments
    lineStyle: {...},
    areaStyle: {...}
  }]
}

or callback rules:

{
  linePieces: [{
    rule: function(params) { return params.dataIndex % 4 === 1; },
    lineStyle: {...},
    areaStyle: {...}
  }]
}

We should also provide a way to set the lineStyle for the lines from connectNulls. The API may be

{
  nullLineStyle: {...},
  nullAreaStyle: {...}
}

or

{
  connectNullStyle: {
    lineStyle: {...},
    areaStyle: {...}
  }
}

or

{
  linePieces: [{
    rule: function(params) { return params.isConnectNulls },
    lineStyle: {...},
    areaStyle: {...}
  }]
}

This issue is a task for OSPP so it will probably be fixed by a student from the program. Discussion about the design and your own requirement is always welcomed.

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:6
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
pe-2commented, May 31, 2022

You’re welcome, It’s my pleasure. I will submit the application after I complete it. 😁

1reaction
Oviliacommented, May 31, 2022

@pe-2 Thanks for your suggestion. Although we do not have something like this for other options, theoretically speeking, this could also be a solution. I would suggest comparing each of these solutions and getting to a conclusion which one is the best. The thinking behind the choice of API design is the most important thing for this task.

P.S. We don’t have any application on this task yet. Please make sure you submit the application on time.

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

To Draw Straight Segments of Feature Lines | Civil 3D 2022
The command to draw a feature line has options to specify the elevations of the feature line, including an option to retrieve the...
Read more >
Highcharts connectNulls with dotted line - Stack Overflow
I know, that I can connect the line with connectNulls: true . Question: Is it possible to mark the connection in a separate...
Read more >
Javascript highcharts Line Chart - Java2s.com
Automated y-axis-title-offset in line chart for varying length of y-axis title? Calculate the 85th percentile for yAxis in line chart · show different...
Read more >
Changelog - Highcharts
Learn all about old and new releases, features and options updates, bug fixes, etc. ... Added individual dash style settings for various parts...
Read more >
CAD-1 Presents - Grading with Feature Lines in Civil 3D
http://cad-1.com/ | Grading with Feature Lines in Civil 3D – Feature line grading involves creating a set of feature lines to define the ......
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