Skip to content
Tropby edited this page Jun 19, 2019 · 1 revision

The following example will create a chart that displays 10 values. The offset is set to 2.

The variables have to be inited as followed

float values[1024];
int valueCount = 10;
int valueOffset = 2;

for( int i = 0; i < 200; i++ ) 
{
    values[i] = rand()*100;
}

In your main loop you call the nk_plot to render the chart.

nk_plot(ctx, chartType, values, valueCount, valueOffset);

Chart Example