Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
|
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 4th, 2003, 10:23 PM
Authorized User
 
Join Date: Oct 2003
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
Default Graph Customization

    I have successfully generate graph that generate sales report by year and by month. My problem that is how can i make the graph changes if i only want to view a few product of my choice.
    For example, a graph display sales from 1999 to 2003 for product 1-5. How am i going to make the graph changes if the the user want to view only selected product from the graph such as for product 1 and product 3?
    Can php be used to build a tabbed dialog box? If yes, can anyone recommend sites where tutorial are available for that.

 
Old November 5th, 2003, 04:02 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well, PHP can create whatever kind of image you want. JPGraph, which you're using, definitely facilitates that process.

Obviously, if you only want a graph to display a single product, then you'd only pass that data to JPGraph.

If you can create a tabbed dialog box using HTML (and possibly javascript), then you can generate that same HTML/Javascript code using PHP. Many sites (amazon and msn, just to name a couple) use a "tabbed" homepage interface (amazon assigns each "store" a tab, and msn assigns "MSN Home" and "My MSN" separate tabs). This implies that you can use the same thing, too.

I suggest the following: Have a form that uses checkboxes to determine which products should be displayed in your graph. When the user submits that form, select the data for only those selected products and pass that data to JPGraph's graph-building functions.

By default, you can have all the checkboxes pre-selected and the graph generated to display the data for all products.



Take care,

Nik
http://www.bigaction.org/
 
Old November 10th, 2003, 05:46 AM
Authorized User
 
Join Date: Oct 2003
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks. But could you please recommend a site for me to learn how to build a tabbed dialog box?


 
Old November 10th, 2003, 03:07 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts
Default

http://www.google.com/search?q=HTML+...pt+tabbed+pane


Take care,

Nik
http://www.bigaction.org/





Similar Threads
Thread Thread Starter Forum Replies Last Post
Discussion board customization marclena SharePoint Development 0 September 7th, 2006 10:40 AM
Visual Studio Intellisence customization gmk51080 ASP.NET 1.0 and 1.1 Professional 1 February 20th, 2006 06:57 AM
Run Time Customization B.V.Madhav Crystal Reports 1 May 10th, 2005 01:57 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.