IoT CAS Frameworks/IOT_Server/Report_Generator_Framework/source/DashBoard-JSONgenerator-ArbitraryDate/src/com/merit/dashboard/service/DashBoardService.java
public void generateLineChartJson(String resourceType, String cCustomer, String service, String selection, String startDate, String endDate, String timestampselection, String customer) {
        lineChartMetrics = new LineChartMetrics();
        SendFileToJson sfj;//modified
        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, cCustomer, service, smilli, emilli, customer,
                        map.get(selection));
                sfj = new SendFileToJson(customer, selection, timestampselection, resourceType, cCustomer, service, "LineChartByTime",
                        szMetricTypeValueJson);
                sfj = null;
            }
            lineChartMetrics = null;
        } catch (Exception e) {
            e.printStackTrace();
            log.error("Error in generateLineChartJson" + e.toString());
        }
    }
/**
     * ************************************************************************************************
     * 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 cCustomer, String service, String selection, String startDate, String endDate, String timestampselection, String customer) {
        lineChartMetrics = new LineChartMetrics();
        SendFileToJson sfj;
        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, cCustomer, service, smilli, emilli, customer,
                        map.get(selection));
                sfj = new SendFileToJson(customer, selection, timestampselection, resourceType, cCustomer, service, "LineChartByTime",
                        szMetricTypeValueJson);
                sfj = null;
            }
            lineChartMetrics = null;
        } catch (Exception e) {
            e.printStackTrace();
            log.error("Error in generateLineChartJson" + e.toString());
        }
    }
public void generateLineChartJson ( String resourceType , String cCustomer , String service , String selection , String startDate , String endDate , String timestampselection , String customer ) { lineChartMetrics = new LineChartMetrics ( ) ; SendFileToJson sfj ; 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 , cCustomer , service , smilli , emilli , customer , map . get ( selection ) ) ; sfj = new SendFileToJson ( customer , selection , timestampselection , resourceType , cCustomer , service , "LineChartByTime" , szMetricTypeValueJson ) ; sfj = null ; } lineChartMetrics = null ; } catch ( Exception e ) { e . printStackTrace ( ) ; log . error ( "Error in generateLineChartJson" + e . toString ( ) ) ; } }
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
//modified