user1284460
user1284460

Reputation: 128

flot chart spacing between bars

I have the following flot chart and it works perfectly but the problem is the bars should be in center to the respective column in the upper table. i used the following options in flot chart and it displays as it showed in the image. But i think this wont align properly as number of columns increases, is there other way to do this?

xaxis: { min: 0.5, max: (legend.maxlength + 0.5), ticks: xAxis },

flot chart
(source: ravidowluri.com)

Upvotes: 0

Views: 2228

Answers (1)

DNS
DNS

Reputation: 38189

Your bars look like they are centered on the table columns, so I'm not entirely sure what you mean. But perhaps the bars.align option is what you're looking for? The API docs explain this in detail, but basically your series would look like this:

series = {
    data = [...],
    bars: {
        align: "center"
    }
}

Upvotes: 1

Related Questions