@Test @Ignore public void testBuildBarChartURL() { List<Integer> chartData = new ArrayList<Integer>(); chartData.add(90); chartData.add(80); chartData.add(30); Properties props = new Properties(); props.put(GoogleChartFactory.CHART_SIZE, "250x100"); props.put(GoogleChartFactory.CHART_AXES, "x,y"); props.put(GoogleChartFactory.CHART_AXES_LABELS, "1:|0%|25%|50%|75%|100%"); props.put(GoogleChartFactory.CHART_LEGEND_TEXT, "total reads|reads with >1 pCDS|reads with >1 hit"); props.put(GoogleChartFactory.CHART_COLOUR, "FF0000|00FF00|0000FF"); String actual = GoogleChartFactory.buildVerticalBarChartURL(props, chartData); String expected = "http: Assert.assertEquals(expected, actual); }
public static String buildVerticalBarChartURL(Properties props, List<Integer> chartData) { StringBuffer result = new StringBuffer(BASE_GOOGLE_CHART_URL); addParameter(result, CHART_TYPE, "bvs"); addGoogleChartParams(result, props); if (chartData != null && chartData.size() > 0) { addChartData(result, chartData); } return result.toString(); }
GoogleChartFactory { public static String buildVerticalBarChartURL(Properties props, List<Integer> chartData) { StringBuffer result = new StringBuffer(BASE_GOOGLE_CHART_URL); addParameter(result, CHART_TYPE, "bvs"); addGoogleChartParams(result, props); if (chartData != null && chartData.size() > 0) { addChartData(result, chartData); } return result.toString(); } }
GoogleChartFactory { public static String buildVerticalBarChartURL(Properties props, List<Integer> chartData) { StringBuffer result = new StringBuffer(BASE_GOOGLE_CHART_URL); addParameter(result, CHART_TYPE, "bvs"); addGoogleChartParams(result, props); if (chartData != null && chartData.size() > 0) { addChartData(result, chartData); } return result.toString(); } private  GoogleChartFactory(); }
GoogleChartFactory { public static String buildVerticalBarChartURL(Properties props, List<Integer> chartData) { StringBuffer result = new StringBuffer(BASE_GOOGLE_CHART_URL); addParameter(result, CHART_TYPE, "bvs"); addGoogleChartParams(result, props); if (chartData != null && chartData.size() > 0) { addChartData(result, chartData); } return result.toString(); } private  GoogleChartFactory(); static String buildPieChartURL(Properties props, List<Integer> chartData, List<String> chartLabels); static String buildHorizontalBarChartURL(Properties props, List<Integer> chartData, List<String> chartLabels); static String buildVerticalBarChartURL(Properties props, List<Integer> chartData); static String buildChartURL(Properties props, List<Integer> chartData); }
GoogleChartFactory { public static String buildVerticalBarChartURL(Properties props, List<Integer> chartData) { StringBuffer result = new StringBuffer(BASE_GOOGLE_CHART_URL); addParameter(result, CHART_TYPE, "bvs"); addGoogleChartParams(result, props); if (chartData != null && chartData.size() > 0) { addChartData(result, chartData); } return result.toString(); } private  GoogleChartFactory(); static String buildPieChartURL(Properties props, List<Integer> chartData, List<String> chartLabels); static String buildHorizontalBarChartURL(Properties props, List<Integer> chartData, List<String> chartLabels); static String buildVerticalBarChartURL(Properties props, List<Integer> chartData); static String buildChartURL(Properties props, List<Integer> chartData); static final String CHART_SIZE; static final String CHART_COLOUR; static final String CHART_TYPE; static final String CHART_DATA; static final String CHART_LABEL; static final String CHART_LEGEND_TEXT; static final String CHART_MARGIN; static final String CHART_AXES; static final String CHART_AXES_LABELS; static final String CHART_MARKER; static final String CHART_DATA_SCALE; }