Radar Chart

A place for Ren'Py tutorials and reusable Ren'Py code.
Forum rules
Do not post questions here!

This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
Post Reply
Message
Author
Human Bolt Diary
Regular
Posts: 109
Joined: Fri Oct 11, 2013 12:46 am
Contact:

Radar Chart

#1 Post by Human Bolt Diary » Mon May 12, 2014 3:34 pm

Edit: 8/11/2015: The download and documentation for this has been moved to: https://github.com/jsfehler/renpy-radarchart
Attachments
screenshot0001.png
Last edited by Human Bolt Diary on Tue Aug 11, 2015 11:09 pm, edited 2 times in total.

User avatar
PyTom
Ren'Py Creator
Posts: 15893
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Radar Chart

#2 Post by PyTom » Mon May 12, 2014 6:00 pm

Nice.

My only suggestion would be to turn:

Code: Select all

   self.data_colour = data_colour
to

Code: Select all

   self.data_colour = color(data_colour)
on line 25, so that it can take "#rrggbbaa" strings instead of color tuples. Other than that, a really nice and straightforward implementation.

EDIT: I just noticed this is Gnu GPL. People who want to use it need to be aware that if they do, their game also has to be licensed under the Gnu GPL - which comes with its own set of requirements.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

Human Bolt Diary
Regular
Posts: 109
Joined: Fri Oct 11, 2013 12:46 am
Contact:

Re: Radar Chart

#3 Post by Human Bolt Diary » Mon May 12, 2014 10:32 pm

Ah, neat. I didn't even know about color().

I've modified it to accept both RGBa and Hex, via:

Code: Select all

try:
 self.data_colour = color(data_color)
except:
 self.data_colour = data_colour
My bad for not mentioning the Gnu GPL. In retrospect, it's overkill for 70 lines of code but I threw it in by habit.

I was also under the misconception that Ren'Py was under the GPL. In the interest of simplicity and how tiny this is, I've changed mine to be under the MIT License as well, and will do so for future projects of this size.

Human Bolt Diary
Regular
Posts: 109
Joined: Fri Oct 11, 2013 12:46 am
Contact:

Re: Radar Chart

#4 Post by Human Bolt Diary » Tue Aug 11, 2015 11:10 pm

I've made a whole bunch of enhancements to this displayable, and thrown it up at: https://github.com/jsfehler/renpy-radarchart

It should be much more usable now.

User avatar
wyverngem
Miko-Class Veteran
Posts: 615
Joined: Mon Oct 03, 2011 7:27 pm
Completed: Simple as Snow, Lady Luck's Due,
Projects: Aether Skies, Of the Waterfall
Tumblr: casting-dreams
itch: castingdreams
Location: USA
Contact:

Re: Radar Chart

#5 Post by wyverngem » Thu Oct 08, 2015 12:34 pm

This seems really cool, but I copy paste it into two new rpy files and it gives me an error.

Code: Select all

I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.


File "game/script.rpy", line 1: expected statement.
    screen radarChart:
                      ^

Ren'Py Version: Ren'Py 6.99.5.602
Not sure if it has something to do with the script python being set to -1500. Made is -1 and it works fine.

User avatar
curry nochi rice
Miko-Class Veteran
Posts: 746
Joined: Sat Mar 27, 2010 3:12 am
Projects: Delicatessen, Whom to Notice, Start of Something, Love Sorcery
Organization: Circle Cosine
IRC Nick: Curry
Skype: after.curry.rice
itch: project-rothera
Contact:

Re: Radar Chart

#6 Post by curry nochi rice » Tue Mar 08, 2016 12:17 pm

Image

This bird has flown. Literally. Anyway, I'm going to attempt fixing around automatically updating the max_value to avoid the spike thing. :lol:
Personal (R-13) | Now at IndieDB | Circle Cosine's itch.io
I wanna be done.

Human Bolt Diary
Regular
Posts: 109
Joined: Fri Oct 11, 2013 12:46 am
Contact:

Re: Radar Chart

#7 Post by Human Bolt Diary » Mon Apr 25, 2016 11:12 pm

curry nochi rice wrote:Image

This bird has flown. Literally. Anyway, I'm going to attempt fixing around automatically updating the max_value to avoid the spike thing. :lol:
I've updated RadarChart to v0.2.1. There's a few changes you'll need to make to use it, but you can now provide "break_limit" as an argument when creating a chart. If True, values can exceed max_value and break out of the chart. If False, the value won't go higher than max_value, even if you provide a larger number.

Along with that, there's support for Labels, Points, and much better animation using ATL.

User avatar
curry nochi rice
Miko-Class Veteran
Posts: 746
Joined: Sat Mar 27, 2010 3:12 am
Projects: Delicatessen, Whom to Notice, Start of Something, Love Sorcery
Organization: Circle Cosine
IRC Nick: Curry
Skype: after.curry.rice
itch: project-rothera
Contact:

Re: Radar Chart

#8 Post by curry nochi rice » Tue Apr 26, 2016 12:26 am

Wow, thanks Bolt. I'll look into it as soon as I get home.
Personal (R-13) | Now at IndieDB | Circle Cosine's itch.io
I wanna be done.

Post Reply

Who is online

Users browsing this forum: No registered users