Opened 7 years ago
Closed 7 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:1 Changed 7 years ago by
comment:2 Changed 7 years ago by
Owner: | set to cjolif |
---|---|
Status: | new → assigned |
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 7 years ago by
Owner: | changed from cjolif to Tarh |
---|---|
Status: | assigned → pending |
comment:4 Changed 7 years ago by
Resolution: | → invalid |
---|---|
Status: | pending → closed |
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!
Here is a diff page : https://github.com/Tarrask/dojox/commit/d9fdd519ff716d7610df7a3a736268572cc99e51#diff-e10367f20a78263c0eea2b73045c642f