Questions tagged [pchart]

pChart is an object oriented PHP charting library.

pChart is a community led PHP library that uses PHP GD & Freetype extensions to generate chart images on the server side to be directly fed to the client's browser or applications such as email or PDFs.

138 questions
0
votes
1 answer

pChart - running scripts as www-data doesn't work

So I'm having trouble running PHP scripts for pChart. Running them as the user who created them works fine, but if I sudo to www-data, I get these errors: PHP Deprecated: Comments starting with '#' are deprecated in…
Soop
  • 345
  • 5
  • 19
0
votes
1 answer

pChart, how to display week start or end date with month like "12/2-8" on x-axis?

Right now my pchart week graph display like this way, But I want to display week on x-axis 12/2-8, 12/9-15 ('month' followed by '/' followed by 'start date', followed by '-', then 'end date')"
Wiram Rathod
  • 1,895
  • 1
  • 19
  • 41
0
votes
2 answers

pChart - PHP Library adding Data points

I am trying to use the pChart PHP Library for generating a graph. And I am confused about its documentation. To add data to the graph, the documentation uses code like: $MyData = new pData(); $data = array(1,2,3,4,99);//some data …
0
votes
2 answers

How to have one database query create two charts using pchart library?

I am quite new to pcharts and understand the mechanics. I nicely made a page where I show a single graph in my template by using the logic. I now have a pretty heavy query that provides me with the right data to create 4…
Geoffrey Stoel
  • 1,300
  • 3
  • 14
  • 24
0
votes
2 answers

Using pChart for the First Time

I am embarrassed, but I cannot seem to create a very simple php chart authored by: http://phpmaster.com/charting-with-pchart to work. I verified the following: my Apache server is running PHP5, GD and Free Type support are enabled, and my directory…
user175328
  • 323
  • 3
  • 9
  • 23
0
votes
1 answer

PCharts labeling X-axis

Would it be possible to just label the x axis by the minimum value and the maximum value instead of having values inbetween? More info on what I'm graphing: I have a large dataset of dates that I am graphing. Currently I am scaling it to a scale of…
Dan
  • 1,041
  • 1
  • 12
  • 32
0
votes
2 answers

Saving pChart image to mysql

I need to save the png that pchart creates to my mysql database. Is there a function that will retrieve the binary data of the png the is created? This is what i tried to add to the pChart library but it just returns one. function getPicture() { …
Jed
  • 929
  • 2
  • 19
  • 32
0
votes
1 answer

pChart - language issue

I'm using pChart. My website has English & other language contents. I can able to print & view those all languages in the same page where chart is displayed. But inside the the chart (i.e generated .png) part of content is not displayed. please…
Parthi04
  • 1,121
  • 4
  • 21
  • 39
0
votes
2 answers

PHP - pchart long labels

I am drawing some graph with PHP and pchart but on the X axis I saw some long labels, any way to avoid overlapping? Or other solutions?
user1412077
0
votes
2 answers

Pchart: X axis, too many ticks

I have quite a large dataset, about a 1000 values. (temperature graph) As you can see i have too many ticks between the hours, i only want one tick per hour. Now it's a very think black line, how can i fix this? The x axis array is like this: …
HyperDevil
  • 2,519
  • 9
  • 38
  • 52
0
votes
5 answers

PHP: duplicate value removal

I have 2 arrays with for example 1000 key's each, one holds a temperature value and the other the hour. Example array temp: [0] = 3.1 [1] = 4.3 [2] = 4.1 [3] = 5.1 [4] = 4.1 Example hour array: [0] = 0 [1] = 1 [2] = 2 [3] = 3 [4] = 3 The problem…
HyperDevil
  • 2,519
  • 9
  • 38
  • 52
-1
votes
1 answer

With pChart I can't draw barchart with less than 4 values

The following code, that uses pChart, works fine, but if I change the series to have less than 4 values I don't get anything back, the page just keeps loading! To reproduce the problem just take out the last numbers of the series: array(9,9,9) for…
Lince81
  • 815
  • 5
  • 17
  • 30
-1
votes
1 answer

Multiple background color in pChart

How to fill the multiple color in the pChart background. For example at the x-axis I want the background of 1-30 is red, 31-60 is blue and 61-90 is green(something like that) Is pChart has a function to do this kind of background or is it has some…
Guilgamos
  • 3,621
  • 4
  • 20
  • 11
-1
votes
1 answer

How to move the yaxis label to the right side of the primefaces chart

Move the y-axis label to the right side of the prime-faces chart.
-1
votes
1 answer

Division by zero in pDraw php class

I'm trying to create a PHP script, which could draw a LineChart from MYSQL table. Everything related with MYSQL works fine, but when I want to draw a LineChart using pChart, I'm getting error (Warning: Division by zero in ...\class\pDraw.class.php…
UFO
  • 1
  • 1
1 2 3
9
10