Hi schwarzenegger,
This is normal. It is because you need at least 2 points to draw a line.
If you have only one point, you may consider to add data symbols for the points. See the "Symbol Line Chart" and "Symbol Line Chart (2)" sample code. With data symbols, even if the line is not visible for one data point, the symbol is still visible.
If you do not want to display data symbols, or you want to display data symbols only if there is one point, you can do something like (as I am not sure of your programming language, I just use Java as an example):
//The usual line layer
LineLayer layer = c.addLineLayer(myData, .......).
//Add data symbol if there is only 1 point
if (myData.length < 2)
layer.getDataSet(0).setDataSymbol(ChartDirector::CircleSymbol, 9);
Hope this can help.
Regards
Peter Kwan |