示例#1
0
 /// <summary>
 /// add a ResultSerie object to the list
 /// </summary>
 /// <param name="result"></param>
 public void addSeries(Series serie)
 {
     if (serie != null) seriesDataList.Add(serie);
 }
示例#2
0
        void setParamsHistory(DataSet config, FeatureResponse featureResponse = null)
        {
            objGparams.Height = Int32.Parse(config.Tables[CHART].Rows[0]["height"].ToString());
            objGparams.Width = Int32.Parse(config.Tables[CHART].Rows[0]["width"].ToString());
            objGparams.WaterMark = cUtil.getApplPath(@"Images\") + config.Tables[CHART].Rows[0]["watermark"].ToString();
            int cols = 1;
            foreach (DataRow dr in config.Tables[ChartSerie].Select("", "panel"))
            {
                int rowCount = 0;
                series = new Series();
                string extras = dr["addlInfo"].ToString() != "" ? " (" + dr["addlInfo"].ToString().TrimStart(',') + ")" : "";
                if (dr.Table.Columns.Contains("trnsTag"))
                    series.SerieName = cUtil.getTransText(dr["trnsTag"].ToString()) + extras;
                else
                    series.SerieName = dr["name"].ToString() + extras;
                series.MarkerType = dr["markerType"].ToString();
                series.Position = dr["axisPosition"].ToString();
                series.Stacked = Convert.ToBoolean(dr["stacked"]);
                series.Gallery = dr["gallery"].ToString();
                series.Color = dr["color"].ToString();
                series.pane = dr.Table.Columns.Contains("panel") ? Int32.Parse(dr["panel"].ToString()) : 1;
                series.axisLabel = (dr.Table.Columns.Contains("labeltext") && dr["labeltext"].ToString() != "") ? cUtil.getTransText(dr["labeltext"].ToString()) : "";
                /* IM01288870 - New Agricast - Missing data - Jerrey - Begin */
                //noofvalues = ((TimeSpan)(endDate - startDate)).Days / (valuestep == 24 ? 1 : valuestep);
                //noofvalues = (valuestep == 30 && noofvalues > 0) ? noofvalues : noofvalues + 1;
                noofvalues = ((TimeSpan)(endDate.AddDays(1) - startDate)).Days / (valuestep == 24 ? 1 : valuestep);
                /* IM01288870 - New Agricast - Missing data - Jerrey - End */
                double?[] vals = new double?[noofvalues];
                DataRow[] dt = null;
                DateTime from = startDate;
                DateTime to = endDate;
                if (dr["year"].ToString() != "")
                {
                    from = new DateTime(Int32.Parse(dr["year"].ToString()), from.Month, (from.Month == 2 && from.Day > 28) ? 28 : from.Day);
                    int range = (endDate.Year - startDate.Year);
                    to = new DateTime(Int32.Parse(dr["year"].ToString()) + range, to.Month, (to.Month == 2 && to.Day > 28) ? 28 : to.Day);
                    if (range != 0)
                        series.SerieName = series.SerieName + " " + dr["year"].ToString() + "-" + (Int32.Parse(dr["year"].ToString()) + range).ToString();
                    else
                        series.SerieName = series.SerieName + " " + dr["year"].ToString();
                    if (to > DateTime.Parse(config.Tables["ChartData"].Select("date=max(date)")[0]["date"].ToString()))
                    {
                        to = DateTime.Parse(config.Tables["ChartData"].Select("date=max(date)")[0]["date"].ToString());
                    }
                }
                dt = config.Tables["ChartData"].Select("date>='" + from + "' and date<='" + to + "'", "date asc");
                if (dt != null && dt.Count() != 0)
                {
                    if (series.MarkerType.ToString().ToLower() == "marker")
                    {
                        ArrayList mks = new ArrayList();
                        ResultMarker marker = null;
                        dswidth = "1";
                        int barwidth = int.Parse(dswidth);
                        string color = dr.Table.Columns.Contains("textColor") ? dr["textColor"].ToString() : Color.Black.Name;
                        for (int x = 0; x < dt.Length; x++)
                        {
                            if (dt[x][cols].ToString() != "")
                            {
                                marker = new ResultMarker(DateTime.Parse(dt[x][0].ToString()).ToOADate(), 0, color, dt[x][cols].ToString());
                                marker.width = barwidth;
                                //marker.label = dt[x][cols].ToString();
                                mks.Add(marker);
                            }
                        }
                        objGparams.markers = (ResultMarker[])mks.ToArray(marker.GetType());
                    }
                    else if (series.MarkerType.ToString().ToLower() == "shader")
                    {

                        ResultShade rsh = null;
                        ArrayList shades = new ArrayList();
                        PaletteMap objPm = new PaletteMap();
                        objPm = getPalleteColor(dr["pallete"].ToString());
                        DateTime cdate = startDate;
                        double shadestart = cdate.ToOADate();
                        double shadestop = cdate.ToOADate();
                        double preval = 0d;
                        double curval = 0d;
                        for (int i = 0; i <= dt.Length; i++)
                        {
                            string color = Color.Red.Name;
                            if (i == 0)
                            {
                                if (!string.IsNullOrEmpty(dt[i][cols].ToString()))
                                    curval = double.Parse(dt[i][cols].ToString());
                                shadestart = DateTime.Parse(dt[i][0].ToString()).ToOADate();
                                preval = curval;
                            }
                            if (i < dt.Length && !string.IsNullOrEmpty(dt[i][cols].ToString()))
                                curval = double.Parse(dt[i][cols].ToString());
                            else
                                curval = 0d;

                            if (preval != curval)
                            {
                                shadestop = DateTime.Parse(dt[i - 1][0].ToString()).ToOADate();
                                if (dr.Table.Columns.Contains("pallete"))
                                {
                                    color = !string.IsNullOrEmpty(preval.ToString()) ? objPm.getColor(preval, "") : Color.Red.Name;
                                }

                                rsh = new ResultShade(shadestart, shadestop, color);
                                shades.Add(rsh);
                                shadestart = 0d;
                                shadestop = 0d;
                                shadestart = DateTime.Parse(dt[i - 1][0].ToString()).ToOADate();
                                preval = curval;
                            }
                        }
                        if (shades.Count > 0) objGparams.shades = (ResultShade[])shades.ToArray(rsh.GetType());
                    }
                    else
                    {
                        int i = 0;
                        from = DateTime.Parse(dt[0]["date"].ToString());
                        /* IM01288870 - New Agricast - Missing data - Jerrey - Begin */
                        //while (from <= to)
                        while (from <= to.AddDays(1).AddDays(-(valuestep == 24 ? 1 : valuestep)))
                        /* IM01288870 - New Agricast - Missing data - Jerrey - End */
                        {
                            double j;
                            if (dt.Length > rowCount && dt[rowCount][cols].ToString() != "" && vals.Length > i)
                            {
                                vals[i] = double.TryParse(dt[rowCount][cols].ToString(), out j) ? j : 0;
                                series.hasvalues = true;
                            }
                            else
                            {
                                missingData = true;
                                series.hasGaps = true;
                            }
                            rowCount++;
                            //}
                            from = from.AddDays(valuestep == 24 ? 1 : valuestep);
                            i++;
                        }
                    }
                }
                if (series.Position.ToLower() == "primary")
                {
                    series.MinorY = double.Parse(config.Tables[PrimaryAxis].Rows[0]["minValue"].ToString());
                    series.MajorY = double.Parse(config.Tables[PrimaryAxis].Rows[0]["maxvalue"].ToString());
                    series.Scale = config.Tables[PrimaryAxis].Rows[0]["ScaleType"].ToString();
                }
                else
                {
                    series.MinorY = double.Parse(config.Tables[SecondaryAxis].Rows[0]["minValue"].ToString());
                    series.MajorY = double.Parse(config.Tables[SecondaryAxis].Rows[0]["maxvalue"].ToString());
                    series.Scale = config.Tables[SecondaryAxis].Rows[0]["ScaleType"].ToString();
                }
                series.values = vals;
                objGparams.addSeries(series);
                cols++;
            }

            objGparams.LeftScaleType = config.Tables[PrimaryAxis].Rows[0]["scaleType"].ToString();
            objGparams.LeftAxisLabel = cUtil.getTransText(config.Tables[PrimaryAxis].Rows[0]["trnsTag"].ToString());
            objGparams.Ymax = double.Parse(config.Tables[PrimaryAxis].Rows[0]["maxValue"].ToString());
            objGparams.Ymin = double.Parse(config.Tables[PrimaryAxis].Rows[0]["minValue"].ToString());

            objGparams.RightAxisLabel = cUtil.getTransText(config.Tables[SecondaryAxis].Rows[0]["trnsTag"].ToString());
            objGparams.RightScaleType = config.Tables[SecondaryAxis].Rows[0]["scaletype"].ToString();
            objGparams.Y2max = double.Parse(config.Tables[SecondaryAxis].Rows[0]["maxValue"].ToString());
            objGparams.Y2min = double.Parse(config.Tables[SecondaryAxis].Rows[0]["minValue"].ToString());

            objGparams.BottomLabels = getLabelsHistory(startDate, selectedEndDate, valuestep);
            string distText = cUtil.getTransText("ResDistanceFrom");
            string stationInfo = dpi.stationName.ToString();
            string lattranslate = objSvcPre.getTranslatedText("Lat", culture);
            string longtranslate = objSvcPre.getTranslatedText("Long", culture);
            stationInfo = stationInfo.Replace("Lat", lattranslate);
            stationInfo = stationInfo.Replace("Long", longtranslate);
            if (featureResponse != null && dpi.stationLatitude != featureResponse.Latitude && dpi.stationLongitude != featureResponse.Longitude)
            {
                distText = distText.Replace("{Dist}", featureResponse.Distance.ToString());
                distText = distText.Replace("{Dir}", cUtil.getTextDirection(Convert.ToInt32(featureResponse.BearingDegrees)));
                distText = distText.Replace("{Elevation}", featureResponse.Altitude.ToString());
                stationInfo = lattranslate + ":" + featureResponse.Latitude + ";" + longtranslate + ":" + featureResponse.Longitude;
            }
            else
            {
                distText = distText.Replace("{Dist}", dpi.distance.ToString());
                distText = distText.Replace("{Dir}", dpi.directionLetter);
                distText = distText.Replace("{Elevation}", dpi.altitude.ToString());
            }

            distText = distText.Replace("{CityName}", HttpUtility.HtmlDecode((LocationInfo.getLocationInfoObj).placeName));
            distText = distText.Replace("<strong>", "").Replace("</strong>", "");

            /*IM01166162 - AgriInfo UI Issues - BEGIN*/
            //objGparams.Title = cUtil.getTransText("weather") + " " + cUtil.getTransText("for") + " " + dpi.stationName.ToString() +" "+ distText + "\n" +
            //                    cUtil.getTransText("from")+ " " + startDate.ToString("dd-MMM-yyyy", new CultureInfo(culture)) + " " +
            //                    cUtil.getTransText("to") + " " + selectedEndDate.ToString("dd-MMM-yyyy", new CultureInfo(culture)) + " " + cUtil.getTransText("aggregation")+" :"+ cUtil.getTransText(agriInfo["aggregation"]);
            /*IM01848085 - New Agricast - Agriinfo - "location" name not translatable - BEGIN*/
            //objGparams.Title = cUtil.getTransText("weather") + " " + cUtil.getTransText("for") + " " + dpi.stationName.ToString() + "#" + distText + "#"

            /* IM01848087 - New Agricast - AgriInfo chart title - changing the structure of the lines - Start */
            if (culture == "hu-HU")
            {
                //objGparams.Title = cUtil.getTransText("weather") + " " + cUtil.getTransText("for") + " " + stationInfo + "#" + distText + "#"
                //    /*IM01848085 - New Agricast - Agriinfo - "location" name not translatable - END*/
                //    /* IM01289657 - New Agricast - Agriinfo - date formatting - Jerrey - Start */
                //                    + FormatDateTime(startDate, culture) + " " + cUtil.getTransText("from") //startDate.ToString("dd-MMM-yyyy", new CultureInfo(culture))
                //                    + " " + FormatDateTime(selectedEndDate, culture) + " " + cUtil.getTransText("to") //selectedEndDate.ToString("dd-MMM-yyyy", new CultureInfo(culture))
                //    /* IM01289657 - New Agricast - Agriinfo - date formatting - Jerrey - End */
                //                    + " " + cUtil.getTransText("Aggregation") + ": " + cUtil.getTransText(agriInfo["aggregation"]);
                objGparams.Title = cUtil.getTransText("weather") + " " + cUtil.getTransText("for") + " " + stationInfo + "#" + distText;
            }
            else
            {
                //objGparams.Title = cUtil.getTransText("weather") + " " + cUtil.getTransText("for") + " " + stationInfo + "#" + distText + "#"
                //    /*IM01848085 - New Agricast - Agriinfo - "location" name not translatable - END*/
                //    /* IM01289657 - New Agricast - Agriinfo - date formatting - Jerrey - Start */
                //    + cUtil.getTransText("from") + " " + FormatDateTime(startDate, culture) //startDate.ToString("dd-MMM-yyyy", new CultureInfo(culture))
                //    + " " + cUtil.getTransText("to") + " " + FormatDateTime(selectedEndDate, culture) //selectedEndDate.ToString("dd-MMM-yyyy", new CultureInfo(culture))
                //    /* IM01289657 - New Agricast - Agriinfo - date formatting - Jerrey - End */
                //    + " " + cUtil.getTransText("Aggregation") + ": " + cUtil.getTransText(agriInfo["aggregation"]);
                objGparams.Title = cUtil.getTransText("weather") + " " + cUtil.getTransText("for") + " " + stationInfo + "#" + distText;
            }
            /* IM01848087 - New Agricast - AgriInfo chart title - changing the structure of the lines - End */
            /*IM01166162 - AgriInfo UI Issues - END*/
            if (missingData)
                objGparams.warning = cUtil.getTransText("wm_warning") + ":" + cUtil.getTransText("This chart has been plotted with missing data.");
               // objGparams.FooterText += cUtil.getTransText("chartcopyright");
        }
示例#3
0
        /*3.1 UC – BodenWasser Modell - display webpage as IFrame - Jerrey - Start*/
        private void AddSeriesToChartParams(DataSet config, DataRow dr, string serieName, string axisLabel, string gallery, string position, string markerType, string serieColor, string columnName, int pane)
        {
            int rowCount = 0;
            series = new Series();
            series.SerieName = serieName;
            series.Gallery = gallery;
            series.pane = pane;
            series.Color = serieColor;
            series.MarkerType = markerType;
            series.Position = position;
            series.axisLabel = axisLabel;

            series.Stacked = Convert.ToBoolean(dr["stacked"]);
            /* UAT Issue - Data from Mar 1st & from Mar 6th, the moisture value are not correct - Jerrey - Start */
            startDate = BorderWaterModel.StartDate;
            endDate = BorderWaterModel.EndDate;
            //endDate = DateTime.Parse(agriInfo["endDate"].ToString());
            /* UAT Issue - Data from Mar 1st & from Mar 6th, the moisture value are not correct - Jerrey - End */

            /* IM01288870 - New Agricast - Missing data - Jerrey - Begin */
            //noofvalues = ((TimeSpan)(endDate - startDate)).Days / (valuestep == 24 ? 1 : valuestep);
            //noofvalues = (valuestep == 30 && noofvalues > 0) ? noofvalues : noofvalues + 1;
            noofvalues = ((TimeSpan)(endDate.AddDays(1) - startDate)).Days / (valuestep == 24 ? 1 : valuestep);
            /* IM01288870 - New Agricast - Missing data - Jerrey - End */
            double?[] vals = new double?[noofvalues];

            DataRow[] dt = null;
            DateTime from = startDate;
            DateTime to = endDate;

            dt = config.Tables["ChartData"].Select("date>='" + from + "' and date<='" + to + "'", "date asc");
            if (dt != null && dt.Count() != 0)
            {
                if (series.MarkerType.ToString().ToLower() == "marker")
                {
                    ArrayList mks = new ArrayList();
                    ResultMarker marker = null;
                    dswidth = "1";
                    int barwidth = int.Parse(dswidth);
                    string color = dr.Table.Columns.Contains("textColor") ? dr["textColor"].ToString() : Color.Black.Name;
                    for (int x = 0; x < dt.Length; x++)
                    {
                        if (dt[x][columnName].ToString() != "")
                        {
                            marker = new ResultMarker(DateTime.Parse(dt[x][0].ToString()).ToOADate(), 0, color, dt[x][columnName].ToString());
                            marker.width = barwidth;
                            mks.Add(marker);
                        }
                    }
                    objGparams.markers = (ResultMarker[])mks.ToArray(marker.GetType());
                }
                else if (series.MarkerType.ToString().ToLower() == "shader")
                {

                    ResultShade rsh = null;
                    ArrayList shades = new ArrayList();
                    PaletteMap objPm = new PaletteMap();
                    objPm = getPalleteColor(dr["pallete"].ToString());
                    DateTime cdate = startDate;
                    double shadestart = cdate.ToOADate();
                    double shadestop = cdate.ToOADate();
                    double preval = 0d;
                    double curval = 0d;
                    for (int i = 0; i <= dt.Length; i++)
                    {
                        string color = Color.Red.Name;
                        if (i == 0)
                        {
                            if (!string.IsNullOrEmpty(dt[i][columnName].ToString()))
                                curval = double.Parse(dt[i][columnName].ToString());
                            shadestart = DateTime.Parse(dt[i][0].ToString()).ToOADate();
                            preval = curval;
                        }
                        if (i < dt.Length && !string.IsNullOrEmpty(dt[i][columnName].ToString()))
                            curval = double.Parse(dt[i][columnName].ToString());
                        else
                            curval = 0d;

                        if (preval != curval)
                        {
                            shadestop = DateTime.Parse(dt[i - 1][0].ToString()).ToOADate();
                            if (dr.Table.Columns.Contains("pallete"))
                            {
                                color = !string.IsNullOrEmpty(preval.ToString()) ? objPm.getColor(preval, "") : Color.Red.Name;
                            }

                            rsh = new ResultShade(shadestart, shadestop, color);
                            shades.Add(rsh);
                            shadestart = 0d;
                            shadestop = 0d;
                            shadestart = DateTime.Parse(dt[i - 1][0].ToString()).ToOADate();
                            preval = curval;
                        }
                    }
                    if (shades.Count > 0) objGparams.shades = (ResultShade[])shades.ToArray(rsh.GetType());
                }
                else
                {
                    int i = 0;
                    /* IM01288870 - New Agricast - Missing data - Jerrey - Begin */
                    //while (from <= to)
                    while (from <= to.AddDays(1).AddDays(-(valuestep == 24 ? 1 : valuestep)))
                    /* IM01288870 - New Agricast - Missing data - Jerrey - End */
                    {
                        double j;
                        if (bool.Parse(agriInfo["IsGDD"]))
                            if (from != DateTime.Parse(dt[rowCount][0].ToString()))
                            {
                                from = from.AddDays(valuestep == 24 ? 1 : valuestep);
                                i++;
                                continue;
                            }
                        if (dt.Length > rowCount && dt[rowCount][columnName].ToString() != "" && vals.Length > i)
                        {
                            vals[i] = double.TryParse(dt[rowCount][columnName].ToString(), out j) ? j : 0;
                            series.hasvalues = true;
                        }
                        else
                        {
                            missingData = true;
                            series.hasGaps = true;
                        }
                        rowCount++;

                        from = from.AddDays(valuestep == 24 ? 1 : valuestep);
                        i++;
                    }
                }
            }
            if (series.Position.ToLower() == "primary")
            {
                series.MinorY = double.Parse(config.Tables[PrimaryAxis].Rows[0]["minValue"].ToString());
                series.MajorY = double.Parse(config.Tables[PrimaryAxis].Rows[0]["maxvalue"].ToString());
                series.Scale = config.Tables[PrimaryAxis].Rows[0]["ScaleType"].ToString();
            }
            else
            {
                series.MinorY = double.Parse(config.Tables[SecondaryAxis].Rows[0]["minValue"].ToString());
                series.MajorY = double.Parse(config.Tables[SecondaryAxis].Rows[0]["maxvalue"].ToString());
                series.Scale = config.Tables[SecondaryAxis].Rows[0]["ScaleType"].ToString();
            }
            series.values = vals;

            objGparams.addSeries(series);
        }
示例#4
0
        private void setParams(DataSet config)
        {
            objGparams.Height = Int32.Parse(config.Tables[CHART].Rows[0]["height"].ToString());
            objGparams.Width = Int32.Parse(config.Tables[CHART].Rows[0]["width"].ToString());
            objGparams.WaterMark = cUtil.getApplPath(@"Images\") + config.Tables[CHART].Rows[0]["watermark"].ToString();
            objGparams.TodayMarker = (bool)(config.Tables[CHART].Rows[0]["todaymarker"]);
            //to enable or diable feedback
            objGparams.HasFeedback = bool.Parse(config.Tables[CHART].Rows[0]["feedback"].ToString());

            int cols = 1;
            //Add for IM01977477:AIS - Modify kecp01fao publication - 20140802 - start
            for (int i = config.Tables[ChartSerie].Rows.Count-1; i > -1; i--)
            {
                if (config.Tables[ChartSerie].Columns.Contains("isInvisible") ? bool.Parse(config.Tables[ChartSerie].Rows[i]["isInvisible"].ToString()) : false)
                {
                    config.Tables[ChartSerie].Rows[i].Delete();
                }
            }
            //Add for IM01977477:AIS - Modify kecp01fao publication - 20140802 - end
            foreach (DataRow dr in config.Tables[ChartSerie].Rows)
            {
                series = new Series();
                if (dr.Table.Columns.Contains("trnsTag"))
                    series.SerieName = cUtil.getTransText(dr["trnsTag"].ToString());
                else
                    series.SerieName = dr["name"].ToString();
                series.MarkerType = dr["markerType"].ToString();
                series.Position = dr["axisPosition"].ToString();
                series.Stacked = Convert.ToBoolean(dr["stacked"]);
                series.Gallery = dr["gallery"].ToString();
                series.Color = dr["color"].ToString();
                series.pane = dr.Table.Columns.Contains("panel") ? Int32.Parse(dr["panel"].ToString()) : 1;
                series.inverted = dr.Table.Columns.Contains("inverted") ? bool.Parse(dr["inverted"].ToString()) : false;
                valuesperday = 24 / valuestep;
                noofvalues = (Math.Abs(_end) - Math.Abs(_start)) * valuesperday;
                double?[] vals = new double?[noofvalues];
                for (int i = 0; i < noofvalues; i++)
                {
                    double j;
                    if (i < config.Tables["ChartData"].Rows.Count && config.Tables["ChartData"].Rows[i][cols].ToString() != "")
                    {
                        vals[i] = double.TryParse(config.Tables["ChartData"].Rows[i][cols].ToString(), out j) ? j : 0;
                    }
                    else
                    {
                        missingData = true;
                        series.hasGaps = true;
                    }

                }
                if (series.Position.ToLower() == "primary")
                {
                    series.MinorY = double.Parse(config.Tables[PrimaryAxis].Rows[0]["minValue"].ToString());
                    series.MajorY = double.Parse(config.Tables[PrimaryAxis].Rows[0]["maxvalue"].ToString());
                    series.Scale = config.Tables[PrimaryAxis].Rows[0]["ScaleType"].ToString();
                    calcMaxY = (vals.Max() ?? 0d) > calcMaxY ? (vals.Max() ?? 0d) : calcMaxY;
                    calcMinY = (vals.Min() ?? 0d) < calcMinY ? (vals.Min() ?? 0d) : calcMinY;
                }
                else
                {
                    series.MinorY = double.Parse(config.Tables[SecondaryAxis].Rows[0]["minValue"].ToString());
                    series.MajorY = double.Parse(config.Tables[SecondaryAxis].Rows[0]["maxvalue"].ToString());
                    series.Scale = config.Tables[SecondaryAxis].Rows[0]["ScaleType"].ToString();
                    calcMaxY2 = (vals.Max() ?? 0d) > calcMaxY2 ? (vals.Max() ?? 0d) : calcMaxY2;
                    calcMinY2 = (vals.Min() ?? 0d) < calcMinY2 ? (vals.Min() ?? 0d) : calcMinY2;
                }
                series.values = vals;
                objGparams.addSeries(series);
                cols++;
            }

            objGparams.LeftScaleType = config.Tables[PrimaryAxis].Rows[0]["scaleType"].ToString();
            objGparams.LeftAxisLabel = cUtil.getTransText(config.Tables[PrimaryAxis].Rows[0]["trnsTag"].ToString());
            objGparams.Ymax = double.Parse(config.Tables[PrimaryAxis].Rows[0]["maxValue"].ToString());
            objGparams.Ymin = double.Parse(config.Tables[PrimaryAxis].Rows[0]["minValue"].ToString());

            objGparams.RightAxisLabel = cUtil.getTransText(config.Tables[SecondaryAxis].Rows[0]["trnsTag"].ToString());
            objGparams.RightScaleType = config.Tables[SecondaryAxis].Rows[0]["scaletype"].ToString();
            objGparams.Y2max = double.Parse(config.Tables[SecondaryAxis].Rows[0]["maxValue"].ToString());
            objGparams.Y2min = double.Parse(config.Tables[SecondaryAxis].Rows[0]["minValue"].ToString());
            //Add for IM01977477:AIS - Modify kecp01fao publication - 20140802 - start
            objGparams.isInvisible = config.Tables[SecondaryAxis].Columns.Contains("isInvisible") ? (bool)(config.Tables[SecondaryAxis].Rows[0]["isInvisible"]) : false;
            //Add for IM01977477:AIS - Modify kecp01fao publication - 20140802 - end
            if (objServiceInfo != null && objServiceInfo.Unit.ToString().ToLower() == "imperial")
            {
                if (config.Tables[PrimaryAxis].Rows[0]["maxValueImperialSpecified"].ToString().ToLower() == "true" && config.Tables[PrimaryAxis].Rows[0]["minValueImperialSpecified"].ToString().ToLower() == "true")
                {
                    objGparams.Ymax = double.Parse(config.Tables[PrimaryAxis].Rows[0]["maxValueImperial"].ToString());
                    objGparams.Ymin = double.Parse(config.Tables[PrimaryAxis].Rows[0]["minValueImperial"].ToString());
                }
                else
                {
                    objGparams.Ymax = (objGparams.Ymax > calcMaxY) ? objGparams.Ymax : calcMaxY;
                    objGparams.Ymin = (objGparams.Ymin < calcMinY) ? objGparams.Ymin : calcMinY;
                }
                if (config.Tables[SecondaryAxis].Rows[0]["maxValueImperialSpecified"].ToString().ToLower() == "true" && config.Tables[SecondaryAxis].Rows[0]["maxValueImperialSpecified"].ToString().ToLower() == "true")
                {
                    objGparams.Y2max = double.Parse(config.Tables[SecondaryAxis].Rows[0]["maxValueImperial"].ToString());
                    objGparams.Y2min = double.Parse(config.Tables[SecondaryAxis].Rows[0]["minValueImperial"].ToString());
                }
                else
                {
                    objGparams.Y2max = (objGparams.Y2max > calcMaxY2) ? objGparams.Y2max : calcMaxY2;
                    objGparams.Y2min = (objGparams.Y2min < calcMinY2) ? objGparams.Y2min : calcMinY2;
                }
            }

            AddMarkers();
            objGparams.BottomLabels = getLabels(startDate);
            getTopAxisLabels();
            if (config.Tables[CHART].Columns.Contains("PlotShades") && bool.Parse(config.Tables[CHART].Rows[0]["PlotShades"].ToString()))
                getSunriseSunsetAndShaders();
            ylabels();
            objGparams.Title = cUtil.getTransText("wc_titlefiveinone");

            if (missingData)
            {
                //objGparams.FooterText = HttpUtility.HtmlDecode("&#9888;") +cUtil.getTransText("wm_warning") + ":" + cUtil.getTransText(" This chart has been plotted with missing data.") + "\n \n";
                objGparams.warning = cUtil.getTransText("wm_warning") + ":" + cUtil.getTransText("This chart has been plotted with missing data.");
            }

            //objGparams.FooterText += cUtil.getTransText("chartcopyright");
            objGparams.minorStep = 1.0 / 24.0;
            int step = dfactor;
            if (step > 0) objGparams.majorStep = (double)step / 24.0;
        }