Chartific
Chartific
charts library for GameMaker, by manta ray
Current version: 2024.2 alpha 2
*** Added more examples, but many more are in the way ***
Intro
Have you ever had the need to draw charts and graphs in your games? No? I didn't think so, but anyway, this is a small library that allows you to render charts and graphs of various styles in your GameMaker projects.
No, really, why?
I am supposedly working on a tycoon/management game, and the latest excuse for me to actually *not* work on it, is I needed a way to render charts in the game, to showcase different statistics. Having said that, there are various other real use cases: use it for your sports games, idle games, tools, consoles, or any project where you need to showcase a little chart here or there!
Features
Chart types
Chartific supports the following chart types:
- Scatter plots, with or without lines
- Bar charts, either clustered or stacked, horizontal or vertical
- Line charts, horizontal or vertical
- Combine bar and line series on the same chart
- Pie charts
- Histograms
Data
Data can come from arrays within your project (static or otherwise!) or from delimited flat files you can import.
Customization
You can customize how nearly everything looks! Check the documentation for the full API.
Chartific also integrates a config file (Chartific_Configuration
) you can edit, so you can have a consistent base look for all your charts in your project.
Other Features
Some other miscellaneous features are:
- Fluent interface with getters/setters
- Tooltips on mouseover for your chart elements
- Switch between "real-time" (rendered each frame) or "static", which renders to a surface and draws the surface.
- Save a chart to PNG
- Export a series to a flat file
- Static method to calculate a host of different statistics around your series/arrays
- Static method to compute a function over a grid of points (for plotting purposes)
- Free, MIT license
- Use at your own risk :)
Quick Start
- Import the Chartific YYMPS file into your project.
- Create a new chart, like so:
- Add a series to the chart (by default, a scatterplot series):
- Plot your chart:
- Set your properties using the setters/getters.
- Make sure you delete your chart on cleanup:
self.chart = new Chart(20, 20, 500, 400);
var _series = new Series("My first series", [1,4,5], [3,5,9]); self.chart.add_series(_series);
// Draw GUI event self.chart.plot();
// Cleanup event self.chart.destroy();
Documentation and Repo
The full API documentation can be found here.
The source code can be checked after importing the package file (Chartific_Internal script).
Status | In development |
Category | Tool |
Platforms | HTML5 |
Rating | Rated 4.0 out of 5 stars (1 total ratings) |
Author | manta ray |
Made with | GameMaker |