Example #1
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();
 }
Example #2
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();
 }
Example #3
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();
 }
Example #4
0
 public void PlotStocksGainLossHistory2(LineGraph graph)
 {
     PlotHistoryInternal(graph, StocksGainLossHistory);
 }
Example #5
0
 public void PlotStocksHistory(LineGraph graph)
 {
     PlotHistoryInternal(graph, StocksHistory);
 }
Example #6
0
 public void PlotLoansInterestHistory(LineGraph graph)
 {
     PlotHistoryInternal(graph, LoansInterestHistory);
 }
Example #7
0
 public void PlotStocksGainLossHistory(LineGraph graph)
 {
     PlotHistoryInternal(graph, StocksGainLossHistory);
     graph.SetBackgroundColor(232, 255, 240);
 }
Example #8
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();
        }
Example #9
0
 public void PlotDepositsInterestHistory(LineGraph graph)
 {
     PlotHistoryInternal(graph, DepositsInterestHistory);
 }
Example #10
0
 public void PlotDefaultsHistory(LineGraph graph)
 {
     PlotHistoryInternal(graph, TotalDefaultsHistory);
 }
Example #11
0
 public void PlotDebtHistory(LineGraph graph)
 {
     PlotHistoryInternal(graph, DebtHistory);
 }
Example #12
0
 public void PlotCashHistory(LineGraph graph)
 {
     PlotHistoryInternal(graph, CashHistory);
 }