javateechart

How to add a new serie using teechart?


This is where I take the signals to show them on the graph, the problem is that they aren't printed. I have been reading the use of the teechar library and I find no problem. Do you see if any part of the code is missing?

            grafica.addSerie("serieName", null);
            grafica.setSerieVisible(index, true);
            grafica.setAutoRange(false, index);
            grafica.setColorSerie(COLOR.Red, index);

Solution

  • What you need to do is add your new serie data:

    grafica.addSerie(ARRAY_AXIS_X_GET_VALUE, ARRAY_AXIS_X_GET_VALUE, YOUR_SERIE_INDEX);
    

    Do not forget to iterate your data.