Gooey GUI Library
Loading...
Searching...
No Matches
gooey_plot.h File Reference

Gooey Plot API - Provides various types of plots for visualization. More...

#include "common/gooey_common.h"

Go to the source code of this file.

Functions

GooeyPlot * GooeyPlot_Create (GOOEY_PLOT_TYPE plot_type, GooeyPlotData *data, int x, int y, int width, int height)
 Creates a plot widget.
 
void GooeyPlot_Update (GooeyPlot *plot, GooeyPlotData *new_data)
 Updates the data of an existing plot.
 

Detailed Description

Gooey Plot API - Provides various types of plots for visualization.

This API allows the addition, drawing, and updating of different types of plots within a Gooey window. It supports various plot types such as line charts, bar charts, etc., and enables dynamic data updates for real-time visualizations.

Author
Yassine Ahmed Ali @license GPL-3.0

Function Documentation

◆ GooeyPlot_Create()

GooeyPlot * GooeyPlot_Create ( GOOEY_PLOT_TYPE  plot_type,
GooeyPlotData *  data,
int  x,
int  y,
int  width,
int  height 
)

Creates a plot widget.

This function allows adding various types of plots to a given Gooey window. The plot type is specified by the user, and the plot data is provided through a GooeyPlotData structure.

Parameters
plot_typeThe type of plot to be added (e.g., LINE, BAR).
dataPointer to the structure containing the plot data.
xThe x-coordinate of the plot's position.
yThe y-coordinate of the plot's position.
widthThe width of the plot.
heightThe height of the plot.
Returns
A pointer to the newly created GooeyPlot.

◆ GooeyPlot_Update()

void GooeyPlot_Update ( GooeyPlot *  plot,
GooeyPlotData *  new_data 
)

Updates the data of an existing plot.

This function updates the plot with new data. It is intended to modify the content of an existing plot, maintaining its type and other configurations.

Parameters
plotPointer to the GooeyPlot to be updated.
new_dataPointer to the new plot data.