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.

Discrete markers broken

See original GitHub issue

Codepen

https://codepen.io/mrblur/pen/zevOQO

Explanation

  • What is the behavior you expect? Discrete markers should be configurable for specific point at X-axis
  • What is happening instead?
  1. No marker at all if global marker size is 0. I want a solid linear graph with single marker pointing to a specific value, kind of a “you are here”. Had to guess dependency on global markers and needed to make global markers “invisible” by specifing their size to 1 and putting same color as the graph itself. This workaround is working, however it does a lot of useless rendering - my graph is up to 3000 points, so a lot of markers which aren’t visible.

  2. Documentation says discrete marker color is specified with fill and stroke which isn’t true. You need to specify fillColor and strokeColor. Again, had to guess, which was confusing AH together with point 1.

  3. The worst part - it isn’t possible to configure discrete marker for first point at all. dataPointIndex: 0 makes marker go away, like not configured. dataPointIndex: 1 makes marker rendered twice - for both first and second point in data series. Other values are working as expected.

  4. Since addressing discrete markers with indexes is not working, tried addressing with categories - that does not work at all, you cannot specify an “x” value as dataPointIndex, and using indexes (which is misleading) is broken as described @ pt. 3.

  • What error message are you getting? No errors, just doesn’t work like expected 😃

Issue Analytics

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

github_iconTop GitHub Comments

4reactions
junedchhipacommented, Apr 3, 2019

In the current version, you need to set markers.size > 0 to see all markers (whether it is discrete or not)

So, markers code becomes

var options = {
  markers: {
    size: 5,
    discrete: [{
      seriesIndex: 0,
      dataPointIndex: 1,
      fillColor: "#0A0",
      strokeColor: "#FFF",
      size: 7
    }
    ]
  }
};


Update codepen - https://codepen.io/apexcharts/pen/PgPXYO

0reactions
vali-mcommented, Oct 27, 2022

@Asmodeios thanks a lot, this workaround is very useful.

This issue is still a problem, for example when using area graph

Read more comments on GitHub >

github_iconTop Results From Across the Web

Discrete Data Analysis: A Friendly Guide to Visualising ... - AWS
Discrete Data Analysis: A Friendly Guide to Visualising Categorical Data for Machine Learning Practitioners, with Examples in R.
Read more >
r - Why and when "Using size for a discrete variable is not ...
I made a scatterplot with ggplot2 and I mapped a binary variable to point size. The result was satisfactory but I got the...
Read more >
Discrete Data in Math | Examples & Numerical Data Sets
Read about the characteristics of discrete data and different plots used to represent ... Markers or other writing utensils with color ...
Read more >
Displaying discrete events (ie deployments) - Kibana
I've been trying to find an example where discrete events get displayed ... Kibana 3 used to let you put markers on the...
Read more >
Discrete mapping in producer replication sets for Instance ...
Our feedback system is currently not working as expected. As a workaround, you can email docfeedback@servicenow.com. Thank you for your patience while we...
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