Problems with using Chart

Hi Bubblers,

I’m using the Chart element to display the historical changes in a fund’s price and I’m running into a couple of problems that I hope some of you can help.

  1. The labels are not displaying in %. For the value label, I can’t figure out how to get it to show in a percentage format. I tried using the “:format” operator but the system shows an error once I use it.


  2. Using the “<-range->” operator. I want the users to have the ability to choose how far back they want to see the data base on intervals of 1Y, 3Y, 5Y, etc. I using a Custom State for each time frame and I am trying get the chart to display data for that certain range based on that Custom State. However, I can’t for the life of me figure out how to use the operator. I tried looking at the documentation and it wasn’t helpful. Resources on YouTube only shows how this operator is used in non-Chart element and doesn’t seem to work.

image

Can anyone point me to where I can get a better understanding of both of these issues?

Thanks,
FundKernel Development

1 Like

Hey @simon.wong

Thanks for the post and great questions! Happy to help the best that I can here and would also recommend checking out some of the other forum posts on the chart element in particular as I know we have some power users here that might bring even more ingenuity to this than I can…

Unfortunately, displaying a formatted number as the left axis of the chart isn’t currently possible. This is because once you use :formatted as, the expression value is actually considered text instead of a number and that field requires a number. You might consider avoiding :format as and instead try using multiplication and :rounded to to get an outcome that works… Another idea would be to use our :groupBy to potentially group the elements you’re displaying in order to better aggregate values depending on how you group them.

Also, while our chart element is excellent for many usecases, you might find that a 3rd party plugin could give greater control over how your labels and values are displayed.

With the range, I see you’re using that in the label expression. Depending on how/if you end up using :group by, you might find that it gives greater control over what is displayed in the label expression. For instance, if you’re displaying the last year, you might group by month and display the month - year as the expression. But, if you show 3 or 5 years, your group by might be by quarter or year and the expression could be the quarter or the year.

Trying to give a few options here! But, you’re welcome to email us directly with any additional questions at Support@Bubble.io

2 Likes

Thanks @Andrew.Vernon . Will definitely try out some of your suggestions.

FundKernel Development

This topic was automatically closed after 70 days. New replies are no longer allowed.