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
2
votes
0 answers

pchart 2.0 - Graph not displayed, when returned from function (PHP)

for a project I need to display the same chart with different data at the same time. The data is read from database. Because of using the same graphs I don`t want to make an extra file for each graph. So my Idea is to put the code of the graph to a…
2
votes
0 answers

How to prevent legend graph size overflow?

My horizontal legend is exceeding the graph width. I don't want use it in vertical direction. How can I break it into multi lines? Here is my code: ... $ds = new pData; $dados['Zyegnematophyceae'] = array(8,184,176); $dados['Chlorophyceae'] =…
Enio Carvalho
  • 153
  • 11
2
votes
2 answers

pChart php graph generation

I want to know a way of inverting the y-axis using pChart. I want the y-axis to start at 0 and 1,2,3,4 etc down, rather than up if that makes sense. In the case of search engine rankings a lower number is better and I want the graph to reflect that…
user254980
2
votes
1 answer

pChart:render the image to browser and embed in html

I have a class name 'MonthReport.class.php' and its structure like the following: class MonthReport{ ..... //some member variables public function pieChart(){ ........ //the image data comes from mysql and data belongs…
ChainWay
  • 133
  • 1
  • 10
2
votes
0 answers

Need help in drawGradientArea

I am new to pchart, I already downloaded the latest version of pChart and test an example and it worked fine for me, and then I tried to test this: drawGradientArea. When I copied and pasted the code in my php file, it did not show the output or…
mathiascolebar
  • 199
  • 3
  • 10
2
votes
3 answers

PHP pChart change color of slices of pie chart

I am developing php pie chats with pChart, it looks nice. Now I want to change color of each slices. Is it possible to change the color?
Vidya L
  • 2,289
  • 4
  • 27
  • 42
2
votes
2 answers

How to specify custom y-axis tick interval with pChart

I'm wanting my y-axis to show the ticker at intervals of 8. I've set my scale mode to manual with a min of 0 and a max of 48 but it still defaults to showing a tick at intervals of 5. I haven't seen a setting or option to customise this yet, is…
Quad6
  • 385
  • 2
  • 5
  • 19
2
votes
0 answers

Pchart - Rotate Image

Using pchart 2 I am looking for a reliable (hopefully built in) way to move the abscissa "HITS" of a bar chart to the left of the chart rather than the top, and the axis with the name to the bottom of the chart. Sory, but Im newbie and I cant upload…
Pedro
  • 166
  • 1
  • 5
2
votes
2 answers

How to correct a foreach loop and get the wanted number of arrays deep?

I'm pushing a single color into an array to override every bargraph color with a single color but its not working as intended, there is something wrong with the arrays. My Original Question: How to push array to barChart and color override with…
Event_Horizon
  • 708
  • 1
  • 11
  • 30
2
votes
1 answer

Issues with pChart outputting image. Whats wrong?

I'm having an issue displaying the 3DPie example pChart in my php page, no matter what the output (Stroke(),autoOutput(),render()) it doesn't render to the browser, but the examples work in the examples folder. My question is: why won't it render to…
Event_Horizon
  • 708
  • 1
  • 11
  • 30
1
vote
1 answer

pChart variables in arrays

I am just editing the Naked example of pChart, I have setup all of my MySQL information to retrive the AddPoints from the database. This uses something like the below. $DataSet->AddPoint(array(1,2,3,4,5,6,7,8,9)); When I attempt to do $var =…
user1307300
  • 17
  • 1
  • 2
  • 4
1
vote
1 answer

pChart not working (failing with errors) in PHP 8.0

I noticed that in PHP 8.0, the excellent PHP library pChart (which I use to draw pie charts) no longer worked. The version I used was 2.1.4, which hadn't been updated since 2014-01-19. It took a long time to figure out what was going on, because my…
Richard
  • 1,912
  • 20
  • 28
1
vote
4 answers

Javascript based graphing / charting toolkits vs PHP based ones

I'm contemplating using http://pchart.sourceforge.net/ for our graphing / charting requirements but another developer suggested the use of a javascript/jquery based one like - http://dojotoolkit.org/ While the look-n-feel for both are different, and…
siliconpi
  • 8,105
  • 18
  • 69
  • 107
1
vote
1 answer

php pchart 2.0 x-axis abscissa position (bottom rather than top)

Using pchart 2 I am looking for a reliable (hopefully built in) way to move the abscissa (x-axis) of a bar chart to the bottom of the chart rather than the top. So considering the above image, I would like to move the 'Hits' axis to the bottom of…
Gavin
  • 2,153
  • 2
  • 25
  • 35
1
vote
3 answers

Zend Framework pChart Integration

Can somebody explain to me how to configure a zendframework project with PCharts?I need to show data from my database in graph form. If possible please send me an example code of how to put the pieces together. Thank you
blow
  • 11
  • 2
1
2
3
9 10