MENU
.net Powerful JavaScript charts

I have an issue setting specific labels using the SVG yaxisLabels property


Posted by Anthony Kuma at 00:10 on Monday 19th January 2026 [link]
Howdy Richard,
this maybe a stupid question (there are no stupid questions, just stupid people).
SVG yaxisLabels property says if yaxisScale is set it to false I can provide an array of labels.
I assign [3.0K,2.3K,1.5K,0.8K,0] to yaxisLabels, but the graph only shows 3.0K at the bottom of y axis, where the 0 should be. I also reversed the array to see if that was the issue, it was not.

I have the following settings:
yaxis: true,                                        
yaxisScale:false,                                    
yaxisColor:dgGridCol,                                
yaxisLabels: outputObjects.yLabelArray,            
yaxisLabelsCount: outputObjects.yLabelArray.length-1,
yaxisScaleMax: MAXYe,                                

Is there anything I am missing?
Regards,
Anthony Kuma

Posted by Richard at 11:49 on Monday 19th January 2026 [link]
> (there are no stupid questions,just stupid people).

:-)

Here's a demo of your chart as a Bar chart and also as a Line chart with the labels:

https://www.rgraph.net/tests/svg.bar/yaxis-tickmarks.html

If the labels are supposed to go from zero up to 3k you can reverse the array as I have done with the Line chart.

HTH

I massaged the configuration a little - but nothing particularly major.

Posted by Anthony Kuma at 23:16 on Tuesday 20th January 2026 [link]
Thanks heaps Richard, I'll take it for a spin, it looks good.
Regards,
AK

Posted by Anthony Kuma at 04:38 on Monday 16th February 2026 [link]
After a number of days experimenting with this issue, it turns out it is a me problem not you.
I migrate the libraries to mainframe and thus begins a painful process of massaging them to fit within so many columns.
I tested the code with multiple versions from my pc to try and figure out what was going on. Everytime it worked.
Then I search for a few keywords in the .core. library on the mainframe and crosschecked it with my PC version. Woohoo, my mainframe uploader adds '-' as a line continuation, this stuffed all the 'y' position mathematics up.
Apologies Richard, appreciate your time.

Posted by Richard at 11:47 on Monday 16th February 2026 [link]
A mainframe? Really?! As in like this:

https://www.networkworld.com/wp-content/uploads/2024/04/data-center-mainframe-woman-it-specialist_shutterstock_1394035181-1.jpg

I'm impressed!

Posted by Anthony Kuma at 23:54 on Monday 16th February 2026 [link]
Yep, exactly like that. But our staff don't look like that though.
It runs an extremely old non relational database.
I use Rgraph to monitor system performance.
I had to convert an older Java version to signed Java to security people making everything painful. Thus, rewriting everything in javascript and utilising Rgraph to do the painful graphing portion.

[Replies are closed]