/** * press any key to change input data for the chart. */ import controlP5.*; ControlP5 controlP5; Chart myChart; float[] f; import processing.opengl.*; void setup() { size(600, 400); smooth(); frameRate(30); controlP5 = new ControlP5(this); myChart = controlP5.addChart("Hello", 20, 20, 100, 100); controlP5.addButton("hello", 2, 200, 200, 100, 20); controlP5.addSlider("slider", 0, 100, 50, 320, 200, 100, 20).setNumberOfTickMarks(11); myChart.setView(new ChartBarDisplay(myChart)); myChart.setStrokeWeight(1); ChartDataSet cds = myChart.addDataSet(); cds.getColor().setForeground(color(255, 150)); f = new float[10]; for (int i=0;i { Chart myChart; public ChartBarDisplay(Chart theChart) { myChart = theChart; } public void display(PApplet p, Chart theController) { p.pushMatrix(); for (int n=0;n