Bar width in canvas chart

Hi all,

this is a follow-up to my question Timeline bar chart in kibana.

I'm creating a timeline bar chart. Since there is no direct way to do this in kibana/canvas I've used a workaround - plot a series of bars with fixed height - only the color of the changes based on values in the data. (As proposed by Joe in the link above)

I would like to change the width of these bars. Idealy, so they wold fill the gaps in between them.

Here is the expression I'm using to create this chart:


| timelion 

  query=".es(index=jsstatus, metric=max:jsstatus, timefield=serverTime).fit(carry)" interval="auto"

| pointseries x="@timestamp" color="value" y=1

| plot defaultStyle={seriesStyle bars="1" lines=0 points=0 color="#000000"} yaxis=false 

 font={font family="'Open Sans', Helvetica, Arial, sans-serif" size=14 align="left" color="#FFFFFF" weight="normal" underline=false italic=false} seriesStyle={seriesStyle label="4" color="#b83c6f"}

 seriesStyle={seriesStyle label="3" color="#1785b0"}

 seriesStyle={seriesStyle label="2" color="#c19628"}

 seriesStyle={seriesStyle label="1" color="#3f9939"} legend=false

| render containerStyle={containerStyle border="0px  " padding="0px" overflow="visible"} css=" "

Changing the value in bars="1" does not seem to make any difference.

Thanks for any help :slight_smile:

That bars value just controls how big, or wide, all of the bars are, it doesn't relate to filling in extra space like you're looking for.

Unfortunately, there's no way to control bar size in a chart other than with more data. It sounds like what you want might be more of a "change detection" view than just looking at raw documents. You could write your own renderer function to produce what you're looking for, and we're happy to provide some information if that's something you're interested in doing. But out of the box, I don't think you're going to get what you're looking for.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.