Esempio n. 1
0
 void PlotHistoryInternal(LineGraph graph, List <float> history)
 {
     graph.Data.Clear();
     graph.Target.Clear();
     for (int i = 0; i < history.Count; ++i)
     {
         graph.Data.Add(history[i]);
     }
     graph.SetColor(0, 0, 0);
     graph.SetBackgroundColor(216, 255, 216);
     graph.SetBaseline(0);
     graph.SetLabel("Evolution");
     graph.Refresh();
 }
Esempio n. 2
0
 public void Plot(LineGraph graph, Stock.Type type, int min, int max)
 {
     graph.Data.Clear();
     for (int i = min; i <= max; ++i)
     {
         float value = GetValue(type, i);
         graph.Data.Add(value);
     }
     graph.SetColor(0, 0, 0);
     graph.SetBaseline(1);
     graph.SetBaselineColor(128, 0, 0);
     graph.SetBackgroundColor(232, 255, 240);
     graph.ShowBaseline(false);
     graph.HideLegendMinMax();
     graph.SetLabel("24m");
     graph.Refresh();
 }
Esempio n. 3
0
        public void PlotHistory(LineGraph graph)
        {
            float target = AssetsHistory[0];

            graph.Data.Clear();
            graph.Target.Clear();
            for (int i = 0; i < AssetsHistory.Count; ++i)
            {
                graph.Data.Add(AssetsHistory[i]);
                graph.Target.Add(target);
                target *= TARGET_PROFIT;
            }
            graph.SetColor(0, 0, 0);
            graph.SetBackgroundColor(255, 255, 232);
            graph.SetBaseline(InitialCash, InitialCash - 100000, InitialCash + 100000);
            graph.SetLabel("Evolution");
            graph.Refresh();
        }
Esempio n. 4
0
 public void PlotGlobal(LineGraph graph, int min, int max)
 {
     graph.Data.Clear();
     for (int i = min; i <= max; ++i)
     {
         float value = GetValue(Stock.Type.Transportation, i);
         value += GetValue(Stock.Type.Energy, i);
         value += GetValue(Stock.Type.Financial, i);
         value += GetValue(Stock.Type.Services, i);
         value += GetValue(Stock.Type.Technology, i);
         value += GetValue(Stock.Type.Healthcare, i);
         graph.Data.Add(value);
     }
     graph.SetColor(0, 0, 0);
     //graph.SetBaseline(6);
     graph.SetBaselineColor(128, 0, 0);
     graph.SetBackgroundColor(232, 255, 240);
     graph.ShowBaseline(false);
     graph.HideLegendMinMax();
     graph.SetLabel("All time");
     graph.Refresh();
 }
Esempio n. 5
0
 public void PlotStocksGainLossHistory(LineGraph graph)
 {
     PlotHistoryInternal(graph, StocksGainLossHistory);
     graph.SetBackgroundColor(232, 255, 240);
 }
Esempio n. 6
0
 public void PlotGlobal(LineGraph graph, int min, int max)
 {
     graph.Data.Clear();
     for (int i = min; i <= max; ++i)
     {
         float value = GetValue(Stock.Type.Transportation, i);
         value += GetValue(Stock.Type.Energy, i);
         value += GetValue(Stock.Type.Financial, i);
         value += GetValue(Stock.Type.Services, i);
         value += GetValue(Stock.Type.Technology, i);
         value += GetValue(Stock.Type.Healthcare, i);
         graph.Data.Add(value);
     }
     graph.SetColor(0, 0, 0);
     //graph.SetBaseline(6);
     graph.SetBaselineColor(128, 0, 0);
     graph.SetBackgroundColor(232, 255, 240);
     graph.ShowBaseline(false);
     graph.HideLegendMinMax();
     graph.SetLabel("All time");
     graph.Refresh();
 }
Esempio n. 7
0
 public void Plot(LineGraph graph, Stock.Type type, int min, int max)
 {
     graph.Data.Clear();
     for (int i = min; i <= max; ++i)
     {
         float value = GetValue(type, i);
         graph.Data.Add(value);
     }
     graph.SetColor(0, 0, 0);
     graph.SetBaseline(1);
     graph.SetBaselineColor(128, 0, 0);
     graph.SetBackgroundColor(232, 255, 240);
     graph.ShowBaseline(false);
     graph.HideLegendMinMax();
     graph.SetLabel("24m");
     graph.Refresh();
 }
Esempio n. 8
0
 void PlotHistoryInternal(LineGraph graph, List<float> history)
 {
     graph.Data.Clear();
     graph.Target.Clear();
     for (int i = 0; i < history.Count; ++i)
     {
         graph.Data.Add(history[i]);
     }
     graph.SetColor(0, 0, 0);
     graph.SetBackgroundColor(216, 255, 216);
     graph.SetBaseline(0);
     graph.SetLabel("Evolution");
     graph.Refresh();
 }
Esempio n. 9
0
 public void PlotStocksGainLossHistory(LineGraph graph)
 {
     PlotHistoryInternal(graph, StocksGainLossHistory);
     graph.SetBackgroundColor(232, 255, 240);
 }
Esempio n. 10
0
        public void PlotHistory(LineGraph graph)
        {
            float target = AssetsHistory[0];

            graph.Data.Clear();
            graph.Target.Clear();
            for (int i = 0; i < AssetsHistory.Count; ++i)
            {
                graph.Data.Add(AssetsHistory[i]);
                graph.Target.Add(target);
                target *= TARGET_PROFIT;
            }
            graph.SetColor(0, 0, 0);
            graph.SetBackgroundColor(255, 255, 232);
            graph.SetBaseline(InitialCash, InitialCash - 100000, InitialCash + 100000);
            graph.SetLabel("Evolution");
            graph.Refresh();
        }