public void Render(FormulaCanvas Canvas, FormulaArea fa) { if (this.Visible) { if (fa.AxisY.AxisPos == AxisPos.Left) { this.Rect.X--; } Graphics currentGraph = Canvas.CurrentGraph; this.Back.Render(currentGraph, this.Rect); } if (this.MajorTick.Visible || this.MinorTick.Visible) { double[] data = fa.Parent.DataProvider["DATE"]; this.fdDate = new FormulaData(data); this.fdDate.Canvas = Canvas; this.fdDate.AxisY = fa.AxisY; PointF[] points = this.fdDate.GetPoints(); this.MajorTick.DataCycle = this.DataCycle; this.MajorTick.Format = this.Format; this.MajorTick.DateFormatProvider = this.DateFormatProvider; this.MajorTick.DrawXAxisTick(Canvas, data, this.fdDate, points, this, this.IntradayInfo); this.MinorTick.DrawXAxisTick(Canvas, data, this.fdDate, points, this, this.IntradayInfo); } }
public override CommonDataProvider GetData(string symbols, Easychart.Finance.DataCycle dataCycle, DateTime startTime, DateTime endTime) { string URL = "http://table.finance.yahoo.com/table.csv?s={0}&d={4}&e={5}&f={6}&g=d&a={1}&b={2}&c={3}&ignore=.csv"; string s = string.Format(URL, symbols, startTime.Month - 1, startTime.Day, startTime.Year, endTime.Month - 1, endTime.Day, endTime.Year); byte[] bs = DownloadBinary(symbols, s); CommonDataProvider cdp = new YahooCSVDataManager().LoadYahooCSV(bs); return(cdp); }
public void SetAxisXDataCycle(int Index, Easychart.Finance.DataCycle dc) { foreach (FormulaArea area in this.Areas) { if ((Index >= 0) && (Index < area.AxisXs.Count)) { area.AxisXs[Index].DataCycle = dc; } } }
public void CopyFrom(FormulaAxisX fax) { this.Visible = fax.Visible; this.DateFormatProvider = fax.DateFormatProvider; this.AutoScale = fax.AutoScale; this.Format = fax.Format; this.MajorTick = (FormulaTick)fax.MajorTick.Clone(); this.MinorTick = (FormulaTick)fax.MinorTick.Clone(); this.Back = (FormulaBack)fax.Back.Clone(); this.LabelFont = (Font)fax.LabelFont.Clone(); this.LabelBrush = (Brush)fax.LabelBrush.Clone(); this.AxisLabelAlign = fax.AxisLabelAlign; this.DataCycle = fax.DataCycle; }