IoT CAS Frameworks/IOT_Server/Report_Generator_Framework/IT/source/DashBoard-JSONgenerator/src/com/merit/dashboard/service/DashBoardService.java
public void generateLineChartJson(String resourceType, String selection, String startDate, String endDate, String timestampselection, String customer) {
        lineChartMetrics = new LineChartMetrics();
        try {
            Date dateStart = formatter1.parse(startDate);
            Date dateEnd = formatter1.parse(endDate);
            smilli = dateStart.getTime() / 1000;
            emilli = dateEnd.getTime() / 1000;
            String szMetricTypeValueJson = null;
            HashMap<String, String> map = ServiceThreadListener.getJSONLocationMap(resourceType);
            if (selection.startsWith("TimeLine")) {
                szMetricTypeValueJson = lineChartMetrics.generateLineChart(resourceType, smilli, emilli, customer, map.get(selection));
                new SendFileToJson(customer, selection, timestampselection, resourceType, "LineChartByTime", szMetricTypeValueJson);
            }
            lineChartMetrics = null;
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
/**
     * ************************************************************************************************
     * This method is calling lineChartMetrics.generateLineChart() and then
     * returning JSON String for creating JSON Files for generating Chart
     *
     * @param customer Selected customerID
     * @param resourceType Different category as
     * Desktop,Server,DataBase,Network,JVM
     * @param startDate from date as subtract(endDate-timestampselection) in
     * Date Format
     * @param endDate Current date in Date Format
     * @return timestampselection Selected Time Period means (hour, days, week,
     * month, year)
     *
     * *************************************************************************************************
     */
This method is calling lineChartMetrics.generateLineChart() and then
returning JSON String for creating JSON Files for generating Chart


This method is calling lineChartMetrics . generateLineChart () and then returning JSON String for creating JSON Files for generating Chart
public void generateLineChartJson(String resourceType, String selection, String startDate, String endDate, String timestampselection, String customer) {
        lineChartMetrics = new LineChartMetrics();
        try {
            Date dateStart = formatter1.parse(startDate);
            Date dateEnd = formatter1.parse(endDate);
            smilli = dateStart.getTime() / 1000;
            emilli = dateEnd.getTime() / 1000;
            String szMetricTypeValueJson = null;
            HashMap<String, String> map = ServiceThreadListener.getJSONLocationMap(resourceType);
            if (selection.startsWith("TimeLine")) {
                szMetricTypeValueJson = lineChartMetrics.generateLineChart(resourceType, smilli, emilli, customer, map.get(selection));
                new SendFileToJson(customer, selection, timestampselection, resourceType, "LineChartByTime", szMetricTypeValueJson);
            }
            lineChartMetrics = null;
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
public void generateLineChartJson ( String resourceType , String selection , String startDate , String endDate , String timestampselection , String customer ) { lineChartMetrics = new LineChartMetrics ( ) ; try { Date dateStart = formatter1 . parse ( startDate ) ; Date dateEnd = formatter1 . parse ( endDate ) ; smilli = dateStart . getTime ( ) / 1000 ; emilli = dateEnd . getTime ( ) / 1000 ; String szMetricTypeValueJson = null ; HashMap < String , String > map = ServiceThreadListener . getJSONLocationMap ( resourceType ) ; if ( selection . startsWith ( "TimeLine" ) ) { szMetricTypeValueJson = lineChartMetrics . generateLineChart ( resourceType , smilli , emilli , customer , map . get ( selection ) ) ; new SendFileToJson ( customer , selection , timestampselection , resourceType , "LineChartByTime" , szMetricTypeValueJson ) ; } lineChartMetrics = null ; } catch ( Exception e ) { e . printStackTrace ( ) ; } }
This method is calling lineChartMetrics.generateLineChart() and then
 returning JSON String for creating JSON Files for generating Chart
This method is calling lineChartMetrics . generateLineChart () and then returning JSON String for creating JSON Files for generating Chart