Linear xScale mis-plots float values for x-data #7

Closed
alecklandgraf opened this Issue Dec 13, 2012 · 1 comment

Projects

None yet

2 participants

@alecklandgraf

When I try to plot data with x values that are decimals, they are floored. Decimal y values are plotted correctly.

Repro

Use the following data to create a new xChart:

{
  "xScale": "linear",
  "yScale": "linear",
  "type": "line-dotted",
  "main": [
    {
      "className": ".pizza",
      "data": [
        {
          "x": 0,
          "y": 0
        },
        {
          "x": 4.5,
          "y": 2
        },
        {
          "x": 4.3,
          "y": 1
        },
        {
          "x": 4.9,
          "y": 3
        }
      ]
    }
  ]
}

Expected

Points are plotted at non-whole values

Actual

Screen Shot 2012-12-13 at 7 19 14 AM

@paularmstrong paularmstrong added a commit that closed this issue Dec 13, 2012
@paularmstrong paularmstrong Do not convert to date using line + linear x-scale
This was an old remnant from before we had `dataFormatX` that probably should have been removed long ago.

fixes gh-7
6dda4e8

thanks, works great.

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