Google image-charts x-axis lable not responding to the chxl attribute - image-charts

I am trying to implement a chart into my website using image-charts, but no matter how I set the x-axis, the labels never works out the way I want it to be.
I read through their documentation, where it says that I can use chxl=<axis_index>:|<label_1>|...|<label_n> to set custome axis labels. I tried using chxl=0:|0|5|10|15|20|25|30|35|40|45|50|55|60 to label my x-axis, from 0 to 60 with the interval of 5, but it is incrementing by the interval of 10.
This is my graph: https://image-charts.com/chart?cht=lxy&chs=999x480&chd=t:0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60|660,570,520,615,492,510,523,495,500,510,562,570,572,531,544,551,568,567,584,570,560,545,537,543,521,517,522,512,519,516,511,519,529,528,533,525,519,531,529,524,524,524,522,518,520,530,518,524,517,512,515,505,507,509,514,505,506,503,502,504,504|0,5,10,15,20,25,30,35,40,45,50,60|0,492,528,612,648,324,492,636,456,492,444,528,396&chco=ffbc8a,407bcb&chg=1,50&chxt=x,y&chls=3|3&chdl=Overall|Last%205%20seconds&chdlp=t&chxl=0:|0|5|10|15|20|25|30|35|40|45|50|55|60
As you can see from the last line of the url, I have chxl=0:|0|5|10|15|20|25|30|35|40|45|50|55|60, but if you click on the link and look at the image, the labels for the x-axis is incrementing by 10. I also tried changing the attribute to other values, but the labels always stay as 0 10 20 30 40 50 60.

Disclaimer: I'm Image-Charts founder.
Image-Charts.com was created in 2016 to be as close as possible as the now soon to be shutdown Google Image Charts API.
Here is our documentation regarding axis labels. Please use our documentation instead of the one from Google Image Charts.
Axis labels will be automatically skipped if they can't be displayed on screen.

Related

How to zoom in the Y-Axis in a line chart using kibana 7.12/7.16

I'm working on an application that get values from different cryptocurrency exchanges and I'm trying to plot that values on Kibana (V 7.12.1) to visually compare the oscillations, everything is working fine (I think), the main application is getting the values from the exchanges and sending to ElasticSearch (V 7.12.1) and I can see the values on Kibana/Discover. I don't have much experience on ElasticSearch/Kibana.
So, in Kibana, I created a new dashboard with a Lens panel, I added the DateTime field to X-axis, ask price and bid price to Y-axis and the exchange name as a break down. The plot looks nice as you can see:
The problem is, at this moment, the values are between 42940 and 43080, a very small difference comparing to the total size of the Y-axis and I can not adjust the Y-axis to get a small window to only see the values of interest.
I don't need different scales to each line, in really it must be the same scale. And values will change over the time, so, the value window will change in size too.
Thanks in advance.
Update:
I did all the same tests on ElasticSearch 7.16.3 and Kibana 7.16.3 and I got exact the same results.
Finally I found it.
There is an Up-Down button to set up the Y-axis, clicking on that button we get the window "Left axis". In that window, the field "Bounds" does this adjust.
Full: to see all the graph;
Data bounds: to automatically adjust the zoom;
Custom: to insert your own limits;

PHPExcel Chart X-Axis Between Tick Marks

I'm working on an old script and I've hit a problem for a configuration that does not appear to be documented. I have a dynamically created bar chart. The bars are vertical. Everything is fine except the position of the bars on the X axis. The first and last one are half cut off. I can fix it easily after producing the spreadsheet. I click on the X-axis and switch the position to "Between tick marks" instead of "On tick marks." I cannot find anything in any form of PHPExcel documentation for setting the position of the X axis to "between" instead of "on." Does this setting exist?
PHPExcel has been replaced by PHPSpreadsheet, but there are cases where it is not possible to change from PHPExcel to PHPSpreadsheet.
The option that must be set is "crossBetween" for the X Axis. PHPExcel does not make this a customizable option. It is hard-coded in Charts.php with the value "midCat". That setting places the first bar directly under the Y axis and the last bar hanging off the right side of the chart. Each bar is cut off. To place the bars between the ticks, edit Charts.php and change the entry for "midCat" to "between". You should only find "midCat" once in the file. This will hard-code all charts to be between the ticks. Change it back if you want it back to what it used to be.
The proper fix is to make this an option you can change. That requires editing multiple files. The Axis object needs a cross_between option. Then, a setter is needed to update that option. The writer needs to pull from that option instead of hard-coding the value. Chart lets you get the X Axis, but you can't set it once you update an option. So, you need a setter for the X Axis for the chart. Then, you can create a chart, get the X Axis, change the crossBetween value, and set the updated axis in the chart.

Pentaho Report Designer stacked percentage chart Y values

I'm new to Pentaho, and I have a small problem I cannot seem find an answer to. I'm running stock Pentaho 5.0.1 stable Report Designer. I have a bar chart that I have setup with a data source, everything there is showing/working correctly. I have changed the bar chart to a stacked percentage, and it stacks as expected. The problem is the values of the chart show from 0.0 to 1.0 incrementing by 0.1. Aesthetically I'd prefer this range from 0% - 100%, but don't see a way to change how it displays.
I see some solutions related to CCC/CGG, but I'm not running any plugins. This is just a out of the box Bar Chart. Playing around with y-axis settings does change the scaling/min/max values but none of that changes the visual display of the chart from the calculated range of 0-1 to is percentage counter part.
Thanks,
On the chart properties, go to Y-Axis and change the property y-tick-fmt-str (stands for Y ticks format string) to 0.0%.

Google Charts Image. Data graph line is not according to axis

I am using Google Chart Image to make graphical chart. I am using PHP to provide the data to the link which in return gives me desired chart. The x-axis and y-axis values are also dynamic i.e. if the graph data is 23,45,37,29... then the y-axis value will range from 20 to 50 and if it is more then that then it will scale according to the data..
Now the problem I am not able to solve is that the dynamic values work fine but I am not able to move the graph line. The image below will clear this point:
Click here for the graph image.
The data provided to this graph is = 190.12,185.53,186.22,186.71,185.87,185.57,186.50,186.58,190.71,191.41,190.12185
The data range is approx between 180 to 190 but graph drawn is between 198 and 200.
I have used chxr to scale the axis. and the link which I am dynamically updating through php is:
THIS
I believe the problem you've got is that you're scaling the axis labels, but not the axis itself. You want to change the chds parameter from a to the range you're dealing with.
This chart looks okay to me.

customize x-axis interval for a real time line chart in achartengine

I have a real-time line chart. For that I use TimeSeries. Now I get new values every second. But I don’t want to get a x-axis line every second. I like to get one every ten seconds.
So maybe, first it would be important to know where the x-axis lines were painted. Is it xymultipleseriesdataset.addSereies(timeSeries)? So maybe I can create a loop that add every 10 second a new title for the x-Axis... or am I totally wrong?
If I am right, you are asking for a way to control which labels are shown on the x-axis.
To do that, you may use the XYMultipleSeriesRenderer.addXTextLabel(timeInMillis, "requiredlabel").
This will cause the automatic generation of labels to stop and you can then have complete control on which labels are shown and which are not.
Edit:
Seems like I was wrong about automatic generation of labels stopping.
Use the method XYMultipleSeriesRenderer.setXLabels(0) to stop the generation of labels. This method is used to set how many labels should be generated for the x axis. Passing 0 should stop automatic labels to stop altogether.

Resources