Change a highchart subtittle - php

Is it possible to change the X axis labels of a highchart to include a decimal separator?
My X axis has the following values 10000,20000,30000 I need to convert to 10.000,20.000,30.000

Try the format option in the docs
Example appending km to the axis points
Example formatting to 3 decimal places

Thousands separator and one decimal place: {value.y:,.1f}

Related

Jpgraph axis number format: Engineering notation for large numbers

I'm using jpgraph to create some plots from measured data.
Now I have a scatter-plot with large numbers on the y-axis.
I would like to change the number format to a number and exponent instead of just showing an integer. Unfortunately I did not find any solution on-line.
The y-axis has a range of 0 to 12000000. I want to display 12E6 instead of 12000000.
Is this possible? Maybe with the SetFormat?

How to force Y axis to use integers in PHPExcel?

This is the graph I get, when I have only numbers below 2. I am generating a report and I'd like to use only integers on Y axis labels. Is there a way to force it in PHPExcel? All the numbers are integers, since they are ratings ranging 1-5. Bars represent the number of ratings.
The options to change are major/minor units in Excel:

Generate N random coordinates in a point delimited form using PHP

I believe I need a solution using PHP for the following problem. Let's start and say we have a map, that width is 100000 and height 100000.
I'd have a region into that map, designed by many X / Y / Z coordinates. something like:
{{-56000;190073;-4509};{-54955;190073;-4509};{-54954;190638;-4509}{-56000;190638;-4509}}
That's 4 points forming a square on our map. But the zones can be defined by 10+ points, so nothing like squares.
Now I'd need a way to generate N different random coordinates that are INSIDE that region.
I don't know where and how to start with this problem, but I know how to use PHP. Just actually lacking the theory part. What algorithm could I use?
Use the rand function to generate x & y coordinates n the range specified by your bounds:
$x = rand($min_x, $max_x);
$y = rand($min_y, $max_y);
I'm not sure what range you want to use for your z coordinate.

Draw textual PHP graph

I need to draw a line chart using PHP which fullfills the following requirements:
Textual X-Axis descriptors
Not every serie has values for all X-Axis values
Markers on the given points
I have already detailed watched pChart, JpGraph and LibChart, but I didn't manage to get the expected result. It should look like this (poorly drawn with MsPaint):
EDIT: The exact problems:
With Libchart, I didn't manage to get different series with not all x axis values filled
With pChart, there was the same problem (e.g. at the above example, pChart would not make a line at the blue series from desc 3 to desc 6, when values 4 and 5 have the value VOID). I could also calculate the values between, but then they would also have markers (e.g. at desc 4 and desc 5)
With JpGraph, I didn't manage to create textual x axis values
Thank you for your help, Community!
Found a solution using pChart:
I can use VOID for points which do not have an own value, and set a config setting like the following one:
$myPicture->drawLineChart(array('BreakVoid'=>false,'VoidTicks'=>0));
Using this settings, VOID will draw correct lines to the next known value.

PHP Flash Charts API w/ Missing Dates?

I have some data of balances ($), dates, and memos. I want to plot this as a line graph. I was happily plotting away with http://www.maani.us/xml_charts/ until I realized that my x-axis was off: there aren't balances for every day, and sometimes there are multiple balances on a single day. How can I compensate for this (space out the dates appropriately)?. I tried using unix_timestamps for the dates so that it could have a numeric value, but this only works for scatter plots (and it sucks at that). The memos I want to appear as tooltips.
Are there any other libraries/APIs that can handle this? Will Fusion Charts do it? Basically I need a chart API that can handle numeric values for both the X and Y axis, but allows me to rename the X axis so it doesn't actually appear as numbers, and supports tooltips (ie is flash based).
Mark,
In FusionCharts scatter chart, we've numeric x and y axis. The good part is that the scatter chart can be made to behave like a line chart. You can connect the points of the scatter chart using a line by setting:
<dataset drawLine='1' ....>
So to show dates on the x-axis, do the following:
Set the value of the least date in your dataset as 0
For every other date, calculate the dateDiff(leastDate, days) and set that as the x-axis value.
Hope that helps...

Categories