78
Views
8
Comments
Solved
Chart within a table

How can I filter a chart within a table based on the records of the table?

2020-06-23 15-22-16
Miguel Sousa
Solution

Ok, so you can create the graphic in a webblock and pass the current Id in there. Inside the webblock you fetch the details by Id.

I've edited the .oml with a new example that shows a list of products, the total inventory and a graphic that shows the inventory overtime for each product.

Hope this helps!

table_chart.oml
2020-06-23 15-22-16
Miguel Sousa

I'm not sure I understand your question.
Does the chart use the same data as the table? If it does you can use the same aggregate for both and the records shown will be the same.


Best regards,

Miguel Sousa

UserImage.jpg
Darcelle Modeste

Hi yes it is but the chart only shows the values of the very first record and repeats that. It does not iterate to filter the chart for each new row.

2020-06-23 15-22-16
Miguel Sousa

Take a look at the oml I've attached, maybe it will help you. If it doesn't please share an .oml or some screenshots of how you are trying to implement the table and chart so we can better understand your problem and help you

table_chart.oml
UserImage.jpg
Darcelle Modeste

I have created screen1 in your sample file to demonstrate the charting issue.

table_chart.oml
2020-06-23 15-22-16
Miguel Sousa

You are creating a new chart in each row of the table and feeding them into the entire list, which is why they all look the same. Are you trying, in the oml example scenario, to show two columns containing the name and current price of the product, and another with the historical prices of THIS product over time?

UserImage.jpg
Darcelle Modeste

Yes that is exactly the concept of what I am trying to accomplish.

2020-06-23 15-22-16
Miguel Sousa
Solution

Ok, so you can create the graphic in a webblock and pass the current Id in there. Inside the webblock you fetch the details by Id.

I've edited the .oml with a new example that shows a list of products, the total inventory and a graphic that shows the inventory overtime for each product.

Hope this helps!

table_chart.oml
UserImage.jpg
Darcelle Modeste
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.