Quantcast
Channel: 🎛️ Dash - Plotly Community Forum
Viewing all articles
Browse latest Browse all 6271

Xaxis names on go.Bar

$
0
0

@Cloemdz wrote:

Hi everyone,

I’m having some struggles setting the right names in a go.Bar figure, here is my problem: I used a list of strings for my x values but on the figure displayed other values are also shown (the ones with the red crosses underneath them (see figure))

Here is the code that I use:

 annee_nbc = {2014: 925, 2015: 81}
 fig_nbc = go.Figure(
            data=[go.Bar(x=[str(a) for a in annee_nbc.keys()], y=list(annee_nbc.values()), marker_color='#BA4A0D')],
            layout={'margin' : {"r":45,"t":45,"l":45,"b":45},'plot_bgcolor':'rgba(0,0,0,0)'}
        )

And here is the result that I obtain:
histograpmme

I feel that my problem is pretty simple, but I cannot seem to find the answer by myself, does anybody have any idea how to solve it?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 6271

Latest Images

Trending Articles



Latest Images