Opened 5 years ago

Closed 5 years ago

#18180 closed defect (invalid)

Candlestick misaligned when providing optionnal x value

Reported by: Tarh Owned by: Tarh
Priority: undecided Milestone: tbd
Component: Charting Version: 1.10.0
Keywords: Cc:
Blocked By: Blocking:

Description

When you create a Candlestick graph with a series where the x value is provided. The candlesticks are rendered shifted by 0.5 units to the right.

I think that the problem is here: https://github.com/dojo/dojox/blob/master/charting/plot2d/Candlesticks.js#L146

You can fix that by subtracting 0.5 to v.x and checking that v.x is a number, something like

var x = ht(typeof v.x == "number" ? (v.x-0.5) : (j+0.5)) + offsets.l + gap,

but there is another issue, where v.x == 0 on line 68. It can also be fixed by checking if val.x is a number:

var x = typeof val.x == "number" ? val.x : j + 1;

I've made a jsfiddle to show the issues. http://jsfiddle.net/Tarh/nUjNb/

Change History (4)

comment:2 Changed 5 years ago by cjolif

Owner: set to cjolif
Status: newassigned

Tarh, do you have signed a Dojo CLA? (http://dojofoundation.org/about/cla). If yes I suggest you submit a pull request to dojox with your fix? (please mention this ticket in the PR description).

comment:3 Changed 5 years ago by cjolif

Owner: changed from cjolif to Tarh
Status: assignedpending

comment:4 Changed 5 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Note: See TracTickets for help on using tickets.