I can't get my XY chart working with database

Hi all,
i put binding in dataSources:


i put name of axis like in query....
image
But i get message on chart No series properly configured...

UPDATED: i finally solved...
But still how to convert from line to column? If i Choose render: column. There is empty chart.

Regards

If render is line, chart is ok:


if i put render column i get:

One by one and with help i get results...
how are transformation works... I have bar chart right now... And also in query string. I would like to color selected bar where in query is string "MASTER"

I'm not exactly sure what you're asking here.

What do you want your chart to look like?

1 Like

i want to color bar in chart if Part_Type is ETALON in yellow and magenta if KALIBER for example...
image

image
Hope it is understandable...

I would make each type a separate series, give it a higher zIndex (so it appears on top of the other series), then change the #.column.appearance props to the colors you wanted.

with different dataset or the same?


this is what i get

how is your chart configured? you can use the preformatted text option when you paste your props so it displays correctly.

file is to long so i am sending JSON file
chart.json (43.6 KB)

That's why you paste it as preformatted text so it gets a scroll bar...

@hw79, I've found there's a limit to the post length and some of the charts' JSON exceeds that. Splitting it into two posts is messy.

1 Like

good to know, thanks!

I noticed you don't have anything in dataSources, is it a binding?

Yes from DB query...

My typical process is to bring in the dataset as a custom prop then on the binding of the dataSources prop transform it into an array of JSON objects like the documentation shows.

edit: Ignore this, I might be giving you some bad advice. Let me figure it out then I'll reach out to you.

I dont understand… do you have some example maybe… tnx for helping

I'm sorry but I've spent 2 days trying to get this to work and I just can't get it. Unfortunately, this is why I'm forced to use Apex Charts in my project because the XY chart component doesn't do columns how I need them to.

I apologize for keeping you waiting.

Okay, I apologize again, it was bothering me, so I took another stab at it.

Is this the result you're looking for?

1 Like

YES this is it :slight_smile: