SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy

We also have a tag=SciChart on where you can earn rep for your questions!


Hi, i have follow the guide to create a chart but i would insert data every 1 second in a Line chart… i have do it but this is the result.

  • Andrew
    That’s really strange. Can you share your code how you are Appending to the DataSeries please?
  • Paolo Mastrangelo
    Shared :)
  • You must to post comments

Hi Paolo,

I took a look on your code and found the problem in insertData() method:

 public void insertData() {
    Random random = new Random();

    long xValue = new Date().getTime() + DateIntervalUtil.fromDays(day);
    xValues.add(new Date(xValue));

    //the data values can be appended to the DataSeries
    dataSeries.append(xValues, yValues);


When you append xValues and yValues they contain all previously added values. So first call of insertData() will append 1 data point, second will append 2 points(1 from previous call and 1 new data point), third call will append 3 points(2 from previous call and 1 new data point) and so on.

To fix this issue you just need to clear xValues/yValues collection before adding new points:


Hope it helps!

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.