Tubby Posted February 22, 2023 Report Share Posted February 22, 2023 Pretty sure most of you guys was confused once in your Caspio lifetime on how you can set your Y Axis to any non-numeric values. I am not sure if we had the same adventures exploring charts but I only saw that it is doable only on Bar charts. So, since I need this on my line chart to show the feedback on a school menu and I can't just simply show 1, 2, 3, 4, 5 in Y axis, I dug a little deeper in highcharts documentation. Here is what I did to change the Y-axis' values. I made a table relationship with my table to a lookup table to show the text equivalent of the feedback in tables(display value). NOTE: you need the values in your main table as integer or number to put it in Y axis. Then in the chart, set the y axis as the feedback field and set the aggregation to None, Next paste this script in your footer block: <script type = "text/javascript" > var timer = setInterval(function() { if (document.getElementsByTagName('rect') != null) { UpdateChart(); } }, 500); function UpdateChart() { try { Highcharts.charts[0].update({ yAxis: { categories: [' ', 'Bad', 'Slightly Bad', 'Mediocre', 'Interesting', 'Outstanding'] } }); clearInterval(timer); } catch (err) { } }; </script> Simply change the categories to your proper labels but do not forget the blank category at the beginning as it will mess up your chart if you forget that. Preview: autonumber 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.