Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I think you can use the method that allow refresh only the series, RefreshSeries, as do in next line of code:</p> <pre><code> candle1.RefreshSeries(); </code></pre> <p>Could you tell me, if it works for you? If you have any problems please let me know.</p> <p>Update information to answer next question:</p> <blockquote> <p>Ok, I guess I am not explaining myself well here, Sandra. Let me try again. Let's say I have a chart that has only one series - 30,000 candles. Let's say I show ALL candles on the chart. Redrawing all 30K candles takes time. Let's say the code changes only ONE candle - the last one. Is there any way to just repaint that little portion of the chart that has the new candle, and not repaint the whole chart in order to show the new change? I tried Invalidate function passing it the candle's rectangle, but it seems that Invalidate() and Invalidate(rect) produce exactly same results.</p> </blockquote> <p>Can you tell us which version of TeeChart are you using?. In the other hand, I have made a simple code where I have modified the CloseValue and I have released that isn't necessary repaint, redraw or refresh Series because the value is updated automatically. I have made the test using last version of TeeChartFor.Net Build number [4.1.2012.01312] and next code:</p> <pre><code>Steema.TeeChart.Styles.Candle candleSeries1; Random r; double tmpOpen; double tmpClose; int count; DateTime dt; TimeSpan ts; private void InitializeChart() { tChart1.Aspect.View3D=false; tChart1.AutoRepaint = false; r = new Random(); candleSeries1.Clear(); candleSeries1.XValues.DateTime = true; candleSeries1.GetHorizAxis.Labels.Angle = 90; count = 0; dt = DateTime.Today; ts = TimeSpan.FromDays(1); candleSeries1.Pen.Visible = false; for (int t=0;t&lt;30000;t++) { tmpOpen = r.Next(100); tmpClose = tmpOpen - r.Next(100); ++count; candleSeries1.Add(dt,tmpOpen,tmpOpen + r.Next(50), tmpClose -r.Next(50),tmpClose); dt += ts; } tChart1.AutoRepaint = true; } private void button1_Click(object sender, EventArgs e) { tmpOpen = r.Next(100); tmpClose = tmpOpen - r.Next(100); candleSeries1[candleSeries1.LastVisibleIndex].Close = tmpOpen; } </code></pre> <p>Thanks, </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload