@@ -69,7 +69,7 @@ protected void paintComponent(Graphics g) {
6969 g2 .setColor (gridColor );
7070 g2 .drawLine (padding + labelPadding + 1 + pointWidth , y0 , getWidth () - padding , y1 );
7171 g2 .setColor (Color .BLACK );
72- String yLabel = ((int ) ((getMinScore () + (getMaxScore () - getMinScore ()) * ((i * 10 .0 ) / numberYDivisions )) * 100f )) / 100.0 + "" ;
72+ String yLabel = ((int ) ((getMinScore () + (getMaxScore () - getMinScore ()) * ((i * 100 .0 ) / numberYDivisions )) * 100f )) / 100.0 + "" ;
7373 FontMetrics metrics = g2 .getFontMetrics ();
7474 int labelWidth = metrics .stringWidth (yLabel );
7575 g2 .drawString (yLabel , x0 - labelWidth - 5 , y0 + (metrics .getHeight () / 2 ) - 3 );
@@ -154,17 +154,14 @@ public List<Double> getScores() {
154154 }
155155
156156 private static void createAndShowGui () {
157- Stock S_AAPL = new Stock ("TSLA" );
158- S_AAPL .retrieve ();
159- ArrayList P = S_AAPL .request ("ADJ_CLOSE" , "2017-05-08" , "2017-11-08" );
160- //ArrayList AAPL_A = S_AAPL.request("CLOSE", "2012-01-01", "2017-01-01");
161-
162- SStat EDIG_S = new SStat (S_AAPL );
163- ArrayList AL = EDIG_S .PercentageChange ("CLOSE" , 30 , "2012-01-01" , "2017-01-01" );
164- System .out .println (AL );
165- ArrayList Dev = EDIG_S .ReturnDeviation ("ADJ_CLOSE" , 30 , "2012-01-01" , "2014-01-01" , "GEO" );
157+ Stock Test = new Stock ("TESTS" );
158+ Test .retrieve ();
159+ SStat Test_St = new SStat (Test );
160+ ArrayList Ret = Test_St .ReturnDeviation ("ADJ_CLOSE" , 1 , "2017-11-02" , "2017-11-10" , "ARI" );
161+ Ret = Test_St .PercentageChange ("ADJ_CLOSE" , 1 , "2016-01-01" , "2017-11-20" );
162+ Ret = Test .Adj_Close ;
166163
167- GUIMain mainPanel = new GUIMain (Dev );
164+ GUIMain mainPanel = new GUIMain (Ret );
168165 mainPanel .setPreferredSize (new Dimension (800 , 600 ));
169166 JFrame frame = new JFrame ("DrawGraph" );
170167 frame .setDefaultCloseOperation (JFrame .EXIT_ON_CLOSE );
0 commit comments