WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Tally Graph] Example Implementation: Fishing Stats (1 post)

  1. Dylan Kuhn
    Member
    Posted 5 years ago #

    Rob at http://www.temagami.info offered to become the first sponsor of Tally Graph in exchange for some guidance setting up the graphs. This may be helpful to other Tally Graph users as well, so here is a transcript of his setup.

    Rob:

    I have just started a new blog at Temagami.info using wordpress and would like to use your plugin to produce a simple barchart which records the numbers of different fish caught/released by species ie Lake Trout, Walleye, Pike, Whitefish, Ling and Other. Each month the graph needs to be archived and a new chart started. I will be logging into the site periodically to update the running tally of fish caught every couple of days I would like the chart to be inserted onto a separate page linked from the main blog page.

    Dylan:

    I think we can get this done in under two hours total - most of it will be working out the usage with you. I may just be able to walk you through it, and not have to do anything behind the scenes.

    If you have the plugin installed and activated, we can get started. Next would be entering some counts. You'll do this by writing a new post, and entering your counts in the custom fields area. If you don't want to attach them to published post, you can check the "Keep this private" box. Then scroll down to Custom Fields, and open it if it's collasped. The first time you enter a count for a species, you'll have to type the name, like "Pike Caught". After that, "Pike Caught" will appear in the menu of custom fields. In the text area on the right, type the number, then click "Add Custom Field". Do this for each species.

    Give that a whirl. You can create bogus data on a test post and will go away later when you delete the post.

    Rob:

    Ok I have saved and posted with custom fields.

    Dylan:

    Ok, those counts will be associated with the date of the post. You can enter counts for different days by making a post for each day, and clicking "Edit" under Post Status to change the post date.

    The easiest way to make a monthly graph is in another post at the end of the month (you can edit that post date too). Try putting this tag in a new post:

    [tally_graph chs="400x200" cht="bvg" key="Pike Caught,Muskee Caught" tally_interval="month" interval_count="1"]

    That should give you the tallies for each species for the month prior to the post. Send me a link if you get something like that to work.

    I called the code a tag, so Rob put it in the Tags area. After I figured that out:

    Ah! I've confused you with lingo, sorry. The bracketed "tag" goes in the post content, not the Tags area. WordPress calls lots of different things tags, and I forget. Specifically, this is a shortcode that goes inside the post, and will be replaced by the graph.

    Rob:

    OK! that works ... what do I add to the tag to label the bars? (Lake Trout, Ling...etc)?

    If I want to create this on a page that is linked to the main page of the blog how would I do this as well.

    Dylan:

    There are two possibilities for labels. The first is to replace the month label with species. You might need to make the graph wider than 400 pixels to accommodate this:

    [tally_graph chs="400x200" cht="bvg" key="Lake Trout,Ling,Northern Pike,Other,Smallmouth Bass,Walleye,Whitefish" tally_interval="month" interval_count="1" chxl="0:|Lake Trout|Ling|Northern Pike|Other|Smallmouth Bass|Walleye|Whitefish"]

    The other way is to color code them and add a key:

    [tally_graph chs="400x250" cht="bvg" key="Lake Trout,Ling,Northern Pike,Other,Smallmouth Bass,Walleye,Whitefish" tally_interval="month" interval_count="1" chco="ff0000,00ff00,0000ff,000000,ffff00,00ffff,ff00ff" chdlp="b" chdl="Lake Trout|Ling|Northern Pike|Other|Smallmouth Bass|Walleye|Whitefish"]

    Those colors will be ugly - you can go to colorpicker.com and replace the six-character color codes like ff0000 with new ones.

    These shortcodes will work in a page just like they do in a post, so you could just create a page each month with the same shortcode in it. Another way might be to make a category called "Fish Counts" or something like that, and make a post each month in that category with a new graph. Then the category link would take you to all the graphs, most recent first.

    After that, Rob used the notes on the plugin page here to finish his Fishing Stats Page. Cool!

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 5 years ago by Dylan Kuhn
  • This topic is not a support question
  • WordPress version: 2.6