Jump to content

Forums

Search In
  • More options...
Find results that contain...
Find results in...

Custom Block with dynamic horizontal bar chart


Recommended Posts

Hi everyone,

I'm hoping someone can help me.

I'd like to set up a block in a sidebar that displays a horizontal bar chart (like what's used in polls) based on quantity of soldiers with a certain MOS, Unit or Position, depending on what page it is on.

I am using Perscom on a site dedicated to a Medieval MMO.  The players of the MMO are citizens that live within settlements within a county, which all fall within a Duchy.  I am setting up pages for each County and then each settlement below that.  There will also be a page for Duchy information (generally the front page).

On the main Duchy page, I would like a block to show a horizontal bar chart showing the top 5 Counties (Unit) by player population.

I would also like to show the top 5 Positions by population within the Duchy.

On each County Page, I would like to show a horizontal bar chart showing the top 5 settlements (MOS) by population, depending on which county page it is on.

I would also like to show the top 5 Positions by population within the County.

On each Settlement Page, I would like to show the top 5 Positions by population within the Settlement.

As of now, my site only has 1 Duchy, multiple counties within the duchy and multiple settlements within each county.  There are currently no plans to add additional duchies, but that could change in the future.

I am pretty new to PHP but if someone could help with a basic template, I can probably get the specifics set.

Maybe something like this:
image.png.f7e03792b74fa9050f6bacea850971c1.png

Thanks everyone.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.