Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use time and category together #4185

Closed
matthewfcarlson opened this issue Apr 26, 2017 · 4 comments
Closed

Unable to use time and category together #4185

matthewfcarlson opened this issue Apr 26, 2017 · 4 comments

Comments

@matthewfcarlson
Copy link

matthewfcarlson commented Apr 26, 2017

Expected Behavior

Lines and points to render correctly

Current Behavior

No lines or points are rendered
image

Possible Solution

It seems like this should be a supported behavior

Steps to Reproduce (for bugs)

  1. Have a time axis on the x axis
  2. Have a category axis on the y axis

Context

This breaks my scenario, which is unfortunate. I can write my own axis if needs be, but I'd like for this to be natively supported.

Environment

  • Chart.js version:
  • Browser name and version:
  • Link to your project:
    I'm trying to use time on the X axis and category on the Y in a line graph. It simply doesn't render any points, which I find odd. No console errors are output. I've tried using both the scattered data point method as well as using xLabels and yLabels.
    Using Chart.JS V 2.5
    Here's a fiddle that describes what I'm trying to do: https://jsfiddle.net/jfaan5so/14/
@etimberg
Copy link
Member

Thanks for reporting this. This definitely should work so it's an error on our end. I'm happy to look at a PR

@etimberg etimberg added this to the Version 2.7 milestone Apr 26, 2017
@matthewfcarlson
Copy link
Author

To generate the PR- how would I go about fixing this? Any pointers on where I might go to investigate. There aren't any errors in the console and I'm not very familiar with the chart.js codebase. Thanks.

@etimberg
Copy link
Member

I would breakpoint getPixelForValue in the category axis and see what's happening

@simonbrunel
Copy link
Member

Fixed in #4507

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants