New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New extension: <Chart> #1227
base: main
Are you sure you want to change the base?
New extension: <Chart> #1227
Conversation
Hello @z900625 👋 Fix this issues and let me know, so I can merge this amazing extension ❤️ |
Thank you for your submission. A few things I notice from a quick check:
I wouldn't add a parameter for it. Either:
Also, definitely keep the action that disables automatic clearing. What VegeTato suggested wouldn't work as nothing tell us the instance exists at the beginning of the scene. |
Hi VegeTato & D8H 1. Clearing the last render images is not for performance. but old drawings may stay. (My main concern is those text objects; I don't think deleting and creating them every frame is a good idea.) So my thought is to suggest users. only run the extension once. In one frame. The example scene does exactly that. Tragger once. Do nothing until the action calls again. The chart itself draw like a rectangle. disables automatic clearing is to make sure users do not need to draw every frame. If the user wants to update, They run the extension once again (also one frame only), Consider the extension works like e-ink (kindle); only updates require calculations. About behavior new extension name will be apply. I know the concept may not be as consistent as normal. I need more advice to improve. thanks again. |
You can have the same action in a behavior. The only difference will be that parameters for style will be properties. Parameters and properties can be used in expressions the exact same way with only their name (the same way as variables in the main events). You don't need to use |
!update ChartExtension.zip |
❗ An internal error has occurred. See logs at https://github.com/GDevelopApp/GDevelop-extensions/actions/runs/8540831270. |
sorry, no idea of what kind of internal error i made. |
Try the command with only |
❗ No updates found. Please check your file. |
4 similar comments
❗ No updates found. Please check your file. |
❗ No updates found. Please check your file. |
❗ No updates found. Please check your file. |
❗ No updates found. Please check your file. |
!update |
✅ Successfully updated the extension. |
I get a internal error when i upload my new example scene. Any suggestion? Thanks. "An internal error has occurred. See logs at https://github.com/GDevelopApp/GDevelop-extensions/actions/runs/8635052716." |
❗ An internal error has occurred. See logs at https://github.com/GDevelopApp/GDevelop-extensions/actions/runs/8635052716. |
I get a internal error when i upload my new example scene. Any suggestion? Thanks. |
This is an extension PR, the example won't be merged here. It's only for the reviewers (but you can submit in the example repository after this extension is merged. |
Description
Chart provides a set of frequently used chart types, and customization options.
Create the following chart with shape painter:
example:
Prepare dataset
Dataset is a structure which contain 3 arrays.
[name] array and [value] array is a must for all types of charts.
[color] array is not necessary for radar chart and line chart.
[dataset] : type: structure (e.g. colorset)
[name] : type: array ("name" is required)
[0] : type: string (e.g. item1)
[1] : type: string (e.g. item2)
*ShapePainter is set to NOT "clear the rendered image between each frame" to reduce lag.
So not suggest to redraw every frame.
*Text object for label is linked to ShapePainter. "Take into account" when delete both object.
How to use the extension
add a shape painter object and text object.
prepare a scene variable. (please copy from example scene as specitic structure is required)
put the shape painter in the scene
in event, add action > general > Chart > Radar Chart
assign all objects and dataset
other parameters are color, opacity, line width.
Checklist
What tier of review do you aim for your extension?
Community (Unreviewed)
Example file
ChartExample.zip
Extension file
ChartExtension.zip