zBritva / charticulator-visual-community

MIT License
8 stars 0 forks source link

X axis can not be ordered #32

Open marko0105 opened 1 month ago

marko0105 commented 1 month ago

Hi, x axis categories on waterfall chart can not be ordered by using another column. Column is set as integer, and it hasn't been recognized to sort it. I have also tried and added string column, no success as well - it doesn't order the labels. If I do custom ordering, it is ok only for current set up, but of I change value on the slicer then order resets - as it was before ordering adjustment. Screenshot 2024-09-15 164601

zBritva commented 1 month ago

@marko0105 yes, it's known issue. The app uses standart sort function of JS, that sorts numbers as string.

marko0105 commented 4 weeks ago

@zBritva , thanks for reply. I tried to replace sort column with letters and it still didn't work. It didn't sort letters in alphabetical order.

zBritva commented 4 weeks ago

@marko0105 Thanks! I will check the issue.

zBritva commented 4 weeks ago

Could you confirm the behaviour? After selecting the column for sorting, we need to click on "Sort" order to sort axis data properly: sorting-axis

Thanks!

marko0105 commented 4 weeks ago

Hi, still not working on my end. Screenshot 2024-09-17 203037

marko0105 commented 4 weeks ago

Hi, to elaborate a little bit, column type_sort I don't show on the waterfall chart, it has been used only for sorting type_label. type_sort column is in the model, in the charticulator.

zBritva commented 4 weeks ago

@marko0105 I have preproduced the issue:

image

Thanks! Confirm that issue is "standart sort function of JS" I will update to provide custom sort for numers and dates in the next version of the visual.

marko0105 commented 3 weeks ago

@zBritva , thanks a lot. If possible, do you have a plan when next version of the visual will be available?

Thank you.

zBritva commented 3 weeks ago

@marko0105 ~2-3 weeks.

You can get DEV version as workaround on https://ilfat-galiev.im/

image Ensure that the fix works for you

marko0105 commented 2 weeks ago

@zBritva , I am using DEV version, sorting seems to work now. Another issue pops up, after click on Save it returns sorting column to type_label column for sorting instead of keeping type_sort column. OrderSort OrderSort_1

marko0105 commented 2 weeks ago

Order by was type_sort which is ok, and it is sorting correctly, but when pressing the image it swaps type_sort to type_label Order by

marko0105 commented 1 week ago

@zBritva , Hi, any progress on Order by issue? I am using DEV, as you suggested, and just checked - Order by is changing field for ordering when you Save the chart. Thank you. Br

zBritva commented 1 week ago

@marko0105 unfortunately there is another bug, fix of that will include to next version:

https://ilfat-galiev.im/docs/charticulator/changelog#1300-next-version

zBritva commented 1 week ago

As workaround, you can use https://appsource.microsoft.com/en-us/product/power-bi-visuals/ilfatgaliev1696579877540.editorvisual?tab=Overview to edit charticulator schema:

Switch the visual on the report to "Power BI visual editor" and switch settings to Chartiuclator:

image

The visual will load the schema:

image

Format the JSON by context menu and find: "orderByExpression":

image

Change column name to another column.

Save the changes and switch the visual back to Charticulator instance

marko0105 commented 1 week ago

@zBritva, thank you so much - workaround is working. much appreciated. Br