Opened 5 years ago

Closed 5 years ago

#17742 closed defect (invalid)

labels in bar chart not aligned properly

Reported by: jsharat Owned by: Eugene Lazutkin
Priority: undecided Milestone: tbd
Component: Charting Version: 1.9.2
Keywords: Cc:
Blocked By: Blocking:

Description

While trying to display reports by days on the bar chart, the range values are getting center aligned to the bars. Suppose say i want to display total, new, and completed tickets report that were opened in past 1 week. the bars are shown on either side of the x axis point for 1 week as shown in attachment -'dojo graph chart'(just fyi('today' has no data)). its difficult to tell for which range the bars are associated with. I am expecting something as shown in attachment 'dojo_graph_chart_expected' where the range values are shown under each bars and not center aligned. for eg. in the attachment 1990 , 1995 are seen under the respective groups of bars which is easy to understand. I am using json object to pass the bardata to barchart. Could you please tell me what need to be done to align the labels of the x axis as required?

Attachments (2)

dojo bar chart.png (21.7 KB) - added by jsharat 5 years ago.
dojo_bar_chart_expected.png (62.4 KB) - added by jsharat 5 years ago.

Download all attachments as: .zip

Change History (4)

Changed 5 years ago by jsharat

Attachment: dojo bar chart.png added

Changed 5 years ago by jsharat

Attachment: dojo_bar_chart_expected.png added

comment:1 Changed 5 years ago by bill

Component: GeneralCharting
Owner: set to Eugene Lazutkin

comment:2 Changed 5 years ago by cjolif

Resolution: invalid
Status: newclosed

There should be an easy option for that, unfortunately there is not but this is not really a bug either as this is not designed for it (would be more of a enhancement request)

That said there are workarounds. For example something like the following:

    addAxis("x", { natural: true,  majorTick: { length: 0}, 
       minorTicks: true, minorTickStep: 0.5, minorLabels: false}).
    addAxis("y", {vertical: true, fixLower: "major", fixUpper: "major", natural: true, includeZero: true}).
    addPlot("default", {type: "ClusteredColumns", gap: 5}).

should give what you expect? (i.e. make major ticks to have a 0 size and add minor ticks between the bars)

Note: See TracTickets for help on using tickets.