Opened 8 years ago
Closed 8 years ago
#15915 closed defect (fixed)
non-indexed column chart are not working if not starting at x=0 and having values greater than the data array length
Reported by: | cjolif | Owned by: | cjolif |
---|---|---|---|
Priority: | undecided | Milestone: | 1.8.1 |
Component: | Charting | Version: | 1.8.0 |
Keywords: | Cc: | Mathevet julien | |
Blocked By: | Blocking: |
Description (last modified by )
With #15308 was introduced in Dojo 1.8 the ability to render non-indexed column plots. However if the first value of the series is at x != 0 and having values greater than the data array length the rendering is incorrect.
Attachments (4)
Change History (18)
Changed 8 years ago by
Attachment: | test_15308.html added |
---|
comment:1 Changed 8 years ago by
Cc: | Mathevet julien added |
---|---|
Description: | modified (diff) |
Summary: | non-indexed column chart are not working if not starting at x=0 → non-indexed column chart are not working if not starting at x=0 and having values greater than the data array length |
This comes from the fact the for loop on the values in Columns.js starts with min that is the first x-value in the data but last for getDataLength() which is (if the data array length is less than the maximum value of the data) the number of items in the data not the max - min x-value.
comment:2 Changed 8 years ago by
Owner: | changed from Eugene Lazutkin to cjolif |
---|---|
Status: | new → assigned |
comment:3 Changed 8 years ago by
comment:4 Changed 8 years ago by
comment:5 Changed 8 years ago by
Well bar width is for me a different "issue". With keeping bar width as it is the expected result is the following (ignoring the values on the x-axis):
Changed 8 years ago by
Attachment: | result.png added |
---|
comment:6 Changed 8 years ago by
We don't need to use min and max because we iterate over data elements
comment:7 Changed 8 years ago by
thanks moogle, I'm going to look at your patch (CLA). Also I suspect the same issue exist on Bar plots as well.
comment:9 Changed 8 years ago by
Thanks a lot for the updated patch.
I see two other "issues":
- StackedColumns/StackedBars now have a getDataLength() method which is never called (and a thus useless maxRunLength variable).
- we have no more optimization in Columns/Bars chart for a chart that is zoomed. The purpose of the min/max was on an indexed chart that is zoomed to avoid iterating over all the values for nothing but just iterate from the first to the last visible value. This is obviously not working on non indexed as we have seen, but I suspect this is not a good idea to remove that optimization for ones that can benefit from it (and maybe we can make everyone benefit from it).
Changed 8 years ago by
Attachment: | patch_15308.diff added |
---|
comment:11 Changed 8 years ago by
moogle, thanks for your latest patch it seems it wants to accommodate the optimization to non-indexed series as well as to Default (line) plots. At this is meant to be committed in 1.8 branch I want to keep the changes minimal and will take inspiration in your patch to create a simpler version. We should however keep that in mind for 1.9.
comment:13 Changed 8 years ago by
Milestone: | tbd → 1.8.1 |
---|
Fixed in trunk, I will commit in 1.8 branch tomorrow if no regression or problem on this patch are reported by then.
test case that does reproduce the issue