Bug on charts?

Hi
I am adding some charts to my dashboard. I have a simple chart showing sales for the last 6 months.

This is my sql + output:

here is my chart code:

<dmx-chart id="chart2" point-size="" type="horizontalBar" multicolor="true" dmx-bind:data="SC_Sales6Months.data.query" label-y="SC_Sales6Months.data.query.Sales" dataset-1:value="NetIncome" responsive="true" label-x="SC_Sales6Months.data.query.Mth"></dmx-chart>

and here is the chart results, you see no month (mth) names, just value1 value2 etc

aaaaaaa

cant work out what I am doing wrong, i did have months showing (once), then i added truncate on it, and it changed to the value1,2 etc, so i removed truncate, now it wont go back to the month names.

thanks

Try x="Mth"

thanks. yeah i had tried that, but same outcome
thanks

It’s weird why your chart even works, because in your SQL output there is no Sales entity at all.

Set the labels property like:

<dmx-chart id="chart2" type="horizontalBar" multicolor="true"
 dmx-bind:data="SC_Sales6Months.data.query"
 dataset-1:value="NetIncome" labels="Mth"
 responsive="true"></dmx-chart>
1 Like

NetIncome is the sales column, we dont actually sell things, we provide a service, so i wanted a chart showing rolling 6 month netincome, so the colulmn is there :slight_smile: just not called Sales, thanks

not sure i follow, it is wappler that put the entries in the code not my hand typing. you called it lables (with s) but wappler code calls it label (no s), which is correct? also wappler calls it label-x not labels. thanks

but oddly enough (I tried what you suggest) and changed it to labels="Mth" and it worked :wink: so huge thanks for that, but still suggests there is a bug in wappler as using the wappler tool to set this up is entering the wrong details into the code and for us “non coders” using low code platforms we kinda hope things work :wink: thanks