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.

I can add a single constant value reference line for a numeric field.

See original GitHub issue

Description

A horizontal or vertical line used for reference vs the data visualized

Example user story

When I was doing analyses for demo week, I wanted to add lines to the chart showing when different events were so that people could easily pick them out in the graph. Here’s an example of what I ended up building in Google Sheets: https://www.loom.com/share/755c8cad166c48bf86bcaf855b6f66aa

Another example: Each quarter, we set goals for our KPIs. These are targets that we want to hit by the end of hte quarter. I really want to add these constant values to my chart so that we can see how we’re progressing towards our goal.

Sketch

Here’s a sketch of how this could work in Miro: https://miro.com/app/board/uXjVP9qJWMk=/?share_link_id=624411838486

Acceptance Criteria

  • I’m able to plot lines that are constant values on my chart
  • These lines can be vertical or horizontal
  • I can only add reference lines to numeric series in my chart.
  • I can only add reference lines based on the fields that are selected to plot on the x-axis or y-axis in my chart (i.e. I can’t use fields in my results table that aren’t in my chart and I can’t use fields that are selected in groups).
  • I can only add one reference line to my plot

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ZeRegocommented, Dec 6, 2022

For reference, echarts mark lines configuration: https://echarts.apache.org/en/option.html#series-line.markLine

Example of vertical and horizontal line:

        markLine: {
          silent: true,
          lineStyle: {
            color: '#333'
          },
          data: [
            {
              yAxis: 300
            },
            {
              xAxis: '2014-08-01'
            },
          ]
        }

Screenshot 2022-12-06 at 13 22 49

1reaction
olly-writes-codecommented, Dec 1, 2022

@olly-writes-code I’ve updated the spec on the issue. Let me know if this would solve your problem!

agreed with the spec changes. Thanks @TuringLovesDeathMetal !

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reference Lines, Bands, Distributions, and Boxes - Tableau
You can add a reference line, band, distribution, or box plot to identify a specific value, region, or range on a continuous axis...
Read more >
Add reference lines to charts - Looker Studio Help
You can add up to 10 reference lines per chart. Reference line options. Type. Determines the value upon which the reference line is...
Read more >
Add reference line from calculated field | Edureka Community
Hi, Follow these steps: 1. Create the calculated field. 2. Add the field in detail shelf. 3. Now go to analytics pane, add...
Read more >
Tableau Reference Lines Tips and Tricks - YouTube
They can provide a constant point of reference, display an average, represent a dynamic, field -driven value, heck, they can even keep your ......
Read more >
Tableau Tutorial - Drawing a constant line, threshold, target, or ...
Quickly add a constant line to any of our charts to reflect targets, thresholds, or other benchmarks. Use the Reference Line feature for ......
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