Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

telerik line chart only showing one month

I have a telerik line chart that works perfectly with any other data, however, when I send the following it only charts october. cant' figure out why...

create line chart

$("#leftLine").kendoChart({    

        dataSource: {
            data: ko.toJS(my.line()),
            group: { field: "Grp_Value"},
            sort: {
                field: "MonthTrxDateFirst",
                dir: "asc"
            },
            schema: {
                model: {
                    fields: {
                        date: {
                            type: "date"
                        }
                    }
                }
            }
        },
        legend: {
            position: "top"
        },
        series: [{
            type:"line",
            field: "Pct_Sales"
            //name: "% Strategy Sales"
        }],
        categoryAxis: {
            field: "MonthTrxDateFirst",
            labels: {
                rotation: -90,
                dateFormats:
                    {
                        minutes: "HH:mm",
                        hours: "HH:mm",
                        days: "dd/MM",
                        months: "MMM 'yy",
                        years: "yyyy"
                    }
            }, type: "Date",  baseUnit: "months"  ,              

            crosshair: {
                visible: true
            }
        },
        valueAxis: {
            labels: {
                format: "{0:P1}"
            }
            //,majorUnit: 10000
        },
        tooltip: {
            visible: true,template: "<div >Date: #=kendo.toString(kendo.parseDate(dataItem.MonthTrxDateFirst, 'yyyy-MM-dd'), 'MM/dd/yyyy')# <br/>  "+
            " Sales: #=kendo.format('{0:C}',dataItem.Sales)# <br/> " +
            "Pct Sales: #=kendo.format('{0:P}',dataItem.Pct_Sales)# <br/> " +
            "GP Pct: #=kendo.format('{0:P}',dataItem.GP_Pct)# </div>"
        }
    });

DATA This XML file does not appear to have any style information associated with it. The document tree is shown below.

<?xml version="1.0" encoding="UTF-8"?>
<ArrayOfNew_DB2_TimeSeries_PctSales_Result xmlns="http://schemas.datacontract.org/2004/07/SPADash" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.354023</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>COMMERCIAL</Grp_Value>
    <MonthTrxDateFirst>2014-01-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.037760</Pct_Sales>
    <Sales>48641.450</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.329960</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>COMMERCIAL/RESI</Grp_Value>
    <MonthTrxDateFirst>2014-01-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.305261</Pct_Sales>
    <Sales>80316.630</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.305978</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>DECOR/HOMEOWNER</Grp_Value>
    <MonthTrxDateFirst>2014-01-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.000748</Pct_Sales>
    <Sales>59.220</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.336629</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>RESIDENTIAL</Grp_Value>
    <MonthTrxDateFirst>2014-01-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.004844</Pct_Sales>
    <Sales>229.600</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.347898</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>COMMERCIAL</Grp_Value>
    <MonthTrxDateFirst>2014-02-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.042067</Pct_Sales>
    <Sales>217491.380</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.348029</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>COMMERCIAL/RESI</Grp_Value>
    <MonthTrxDateFirst>2014-02-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.322431</Pct_Sales>
    <Sales>363864.670</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.382086</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>DECOR/HOMEOWNER</Grp_Value>
    <MonthTrxDateFirst>2014-02-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.016862</Pct_Sales>
    <Sales>4907.910</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.425109</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>MRO</Grp_Value>
    <MonthTrxDateFirst>2014-02-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.000948</Pct_Sales>
    <Sales>505.330</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.295025</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>RESIDENTIAL</Grp_Value>
    <MonthTrxDateFirst>2014-02-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.010681</Pct_Sales>
    <Sales>3290.000</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.320293</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>COMMERCIAL</Grp_Value>
    <MonthTrxDateFirst>2014-03-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.111609</Pct_Sales>
    <Sales>626837.430</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.345350</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>COMMERCIAL/RESI</Grp_Value>
    <MonthTrxDateFirst>2014-03-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.415663</Pct_Sales>
    <Sales>502403.540</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.362625</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>DECOR/HOMEOWNER</Grp_Value>
    <MonthTrxDateFirst>2014-03-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.373628</Pct_Sales>
    <Sales>127139.020</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.394008</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>MRO</Grp_Value>
    <MonthTrxDateFirst>2014-03-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.001207</Pct_Sales>
    <Sales>596.460</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.320835</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>RESIDENTIAL</Grp_Value>
    <MonthTrxDateFirst>2014-03-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.407147</Pct_Sales>
    <Sales>137094.170</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.331953</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>COMMERCIAL</Grp_Value>
    <MonthTrxDateFirst>2014-04-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.101411</Pct_Sales>
    <Sales>592572.460</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.341590</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>COMMERCIAL/RESI</Grp_Value>
    <MonthTrxDateFirst>2014-04-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.410747</Pct_Sales>
    <Sales>583943.010</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.367940</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>DECOR/HOMEOWNER</Grp_Value>
    <MonthTrxDateFirst>2014-04-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.450946</Pct_Sales>
    <Sales>129825.200</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.372337</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>MRO</Grp_Value>
    <MonthTrxDateFirst>2014-04-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.004888</Pct_Sales>
    <Sales>2885.350</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.321790</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>RESIDENTIAL</Grp_Value>
    <MonthTrxDateFirst>2014-04-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.471696</Pct_Sales>
    <Sales>168637.830</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.323770</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>COMMERCIAL</Grp_Value>
    <MonthTrxDateFirst>2014-05-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.128278</Pct_Sales>
    <Sales>647972.500</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.345029</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>COMMERCIAL/RESI</Grp_Value>
    <MonthTrxDateFirst>2014-05-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.395531</Pct_Sales>
    <Sales>541736.100</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.413977</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>DATACOMM</Grp_Value>
    <MonthTrxDateFirst>2014-05-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.041110</Pct_Sales>
    <Sales>2474.800</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.366580</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>DECOR/HOMEOWNER</Grp_Value>
    <MonthTrxDateFirst>2014-05-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.385904</Pct_Sales>
    <Sales>131753.100</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.453110</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>HVAC/PLUMB/IND</Grp_Value>
    <MonthTrxDateFirst>2014-05-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.026418</Pct_Sales>
    <Sales>2571.720</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.380009</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>MRO</Grp_Value>
    <MonthTrxDateFirst>2014-05-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.059962</Pct_Sales>
    <Sales>26809.340</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.320173</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>RESIDENTIAL</Grp_Value>
    <MonthTrxDateFirst>2014-05-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.586537</Pct_Sales>
    <Sales>152053.660</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.338931</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>COMMERCIAL</Grp_Value>
    <MonthTrxDateFirst>2014-06-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.114699</Pct_Sales>
    <Sales>519673.580</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.343102</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>COMMERCIAL/RESI</Grp_Value>
    <MonthTrxDateFirst>2014-06-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.485152</Pct_Sales>
    <Sales>602047.070</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.481070</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>DATACOMM</Grp_Value>
    <MonthTrxDateFirst>2014-06-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.000139</Pct_Sales>
    <Sales>8.980</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.371727</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>DECOR/HOMEOWNER</Grp_Value>
    <MonthTrxDateFirst>2014-06-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.484368</Pct_Sales>
    <Sales>136750.660</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.381854</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>HVAC/PLUMB/IND</Grp_Value>
    <MonthTrxDateFirst>2014-06-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.087700</Pct_Sales>
    <Sales>10847.080</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.373412</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>MRO</Grp_Value>
    <MonthTrxDateFirst>2014-06-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.470327</Pct_Sales>
    <Sales>202671.230</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.318483</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>RESIDENTIAL</Grp_Value>
    <MonthTrxDateFirst>2014-06-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.527196</Pct_Sales>
    <Sales>168812.480</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.333249</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>COMMERCIAL</Grp_Value>
    <MonthTrxDateFirst>2014-07-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.116096</Pct_Sales>
    <Sales>684988.010</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.343053</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>COMMERCIAL/RESI</Grp_Value>
    <MonthTrxDateFirst>2014-07-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.490166</Pct_Sales>
    <Sales>632657.490</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.410114</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>DATACOMM</Grp_Value>
    <MonthTrxDateFirst>2014-07-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.011413</Pct_Sales>
    <Sales>819.310</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.367737</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>DECOR/HOMEOWNER</Grp_Value>
    <MonthTrxDateFirst>2014-07-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.419142</Pct_Sales>
    <Sales>148110.650</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.382776</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>HVAC/PLUMB/IND</Grp_Value>
    <MonthTrxDateFirst>2014-07-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.125291</Pct_Sales>
    <Sales>15785.270</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.367045</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>MRO</Grp_Value>
    <MonthTrxDateFirst>2014-07-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.448216</Pct_Sales>
    <Sales>292163.290</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.321970</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>RESIDENTIAL</Grp_Value>
    <MonthTrxDateFirst>2014-07-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.512803</Pct_Sales>
    <Sales>166202.020</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.331511</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>COMMERCIAL</Grp_Value>
    <MonthTrxDateFirst>2014-08-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.117252</Pct_Sales>
    <Sales>701765.730</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.344469</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>COMMERCIAL/RESI</Grp_Value>
    <MonthTrxDateFirst>2014-08-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.464062</Pct_Sales>
    <Sales>659503.760</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.376877</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>DECOR/HOMEOWNER</Grp_Value>
    <MonthTrxDateFirst>2014-08-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.375086</Pct_Sales>
    <Sales>119252.230</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.386056</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>HVAC/PLUMB/IND</Grp_Value>
    <MonthTrxDateFirst>2014-08-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.085056</Pct_Sales>
    <Sales>12308.170</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.374641</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>MRO</Grp_Value>
    <MonthTrxDateFirst>2014-08-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.398732</Pct_Sales>
    <Sales>236158.560</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.322817</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>RESIDENTIAL</Grp_Value>
    <MonthTrxDateFirst>2014-08-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.569055</Pct_Sales>
    <Sales>161279.320</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.332573</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>COMMERCIAL</Grp_Value>
    <MonthTrxDateFirst>2014-09-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.116554</Pct_Sales>
    <Sales>674817.440</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.345736</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>COMMERCIAL/RESI</Grp_Value>
    <MonthTrxDateFirst>2014-09-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.448292</Pct_Sales>
    <Sales>657833.280</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.631698</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>DATACOMM</Grp_Value>
    <MonthTrxDateFirst>2014-09-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.000469</Pct_Sales>
    <Sales>31.170</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.366126</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>DECOR/HOMEOWNER</Grp_Value>
    <MonthTrxDateFirst>2014-09-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.356703</Pct_Sales>
    <Sales>133588.070</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.413377</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>HVAC/PLUMB/IND</Grp_Value>
    <MonthTrxDateFirst>2014-09-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.108217</Pct_Sales>
    <Sales>14713.660</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.367136</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>MRO</Grp_Value>
    <MonthTrxDateFirst>2014-09-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.387933</Pct_Sales>
    <Sales>241323.320</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.311605</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>RESIDENTIAL</Grp_Value>
    <MonthTrxDateFirst>2014-09-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.572077</Pct_Sales>
    <Sales>208542.220</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.411575</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>blankcustomertype</Grp_Value>
    <MonthTrxDateFirst>2014-10-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.015683</Pct_Sales>
    <Sales>148.260</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.339036</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>COMMERCIAL</Grp_Value>
    <MonthTrxDateFirst>2014-10-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.123435</Pct_Sales>
    <Sales>742510.690</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.343491</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>COMMERCIAL/RESI</Grp_Value>
    <MonthTrxDateFirst>2014-10-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.496651</Pct_Sales>
    <Sales>767057.640</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.516780</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>DATACOMM</Grp_Value>
    <MonthTrxDateFirst>2014-10-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.002760</Pct_Sales>
    <Sales>167.170</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.378926</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>DECOR/HOMEOWNER</Grp_Value>
    <MonthTrxDateFirst>2014-10-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.480457</Pct_Sales>
    <Sales>145768.060</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.402784</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>HVAC/PLUMB/IND</Grp_Value>
    <MonthTrxDateFirst>2014-10-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.175221</Pct_Sales>
    <Sales>19763.290</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.361361</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>MRO</Grp_Value>
    <MonthTrxDateFirst>2014-10-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.434791</Pct_Sales>
    <Sales>268824.030</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.325360</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>RESIDENTIAL</Grp_Value>
    <MonthTrxDateFirst>2014-10-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.460331</Pct_Sales>
    <Sales>180721.030</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>
</ArrayOfNew_DB2_TimeSeries_PctSales_Result>
like image 962
user1813251 Avatar asked Nov 09 '22 21:11

user1813251


1 Answers

This same "issue" has bit me before too. For whatever reason, the "line" chart type assumes that every series grouping (in your case, these are "COMMERCIAL", "DATACOMM", etc...) has a data point for every possible position on the X axis (in your case month).

What happens is that your data gets grouped and sorted. It then takes the first group, which happens to be: "blankcustomertype" and it gets all of its category axis possibilities, which is only 1 data item:

  <New_DB2_TimeSeries_PctSales_Result>
    <GP_Pct>0.411575</GP_Pct>
    <Grp>CustomerType</Grp>
    <Grp_Value>blankcustomertype</Grp_Value>
    <MonthTrxDateFirst>2014-10-01T00:00:00</MonthTrxDateFirst>
    <Pct_Sales>0.015683</Pct_Sales>
    <Sales>148.260</Sales>
    <StdVsException>STRATEGIC</StdVsException>
  </New_DB2_TimeSeries_PctSales_Result>

It then uses this data as the category (X) axis, so it only has 1 data point at 2014-10-01T00:00:00

The rest of the dates for all the other series are ignored because the first series didn't have those dates.

My only guess is that this was done for some performance reason so there is less looping.


What you probably actually want is a scatterLine chart type instead.

Here is a working Kendo Dojo example (I just copy/pasted your original code and turned the XML into JSON to make it easier).

The changed chart options are:

$("#leftLine").kendoChart({    

    dataSource: {
        data: data,
        group: { field: "Grp_Value"},
        sort: {
            field: "MonthTrxDateFirst",
            dir: "asc"
        },
        schema: {
            model: {
                fields: {
                    MonthTrxDateFirst: {
                        type: "date"
                    }
                }
            }
        }
    },
    legend: {
        position: "top"
    },
    series: [{
        type:"scatterLine",
        yField: "Pct_Sales",
        xField: "MonthTrxDateFirst"
        //name: "% Strategy Sales"
    }],
    xAxis: {
        labels: {
            rotation: -90,
            dateFormats:
                {
                    minutes: "HH:mm",
                    hours: "HH:mm",
                    days: "dd/MM",
                    months: "MMM 'yy",
                    years: "yyyy"
                }
        }, type: "date",  baseUnit: "months"  ,              

        crosshair: {
            visible: true
        }
    },
    yAxis: {
        labels: {
            format: "{0:P1}"
        }
        //,majorUnit: 10000
    },
    tooltip: {
        visible: true,template: "<div >Date: #=kendo.toString(kendo.parseDate(dataItem.MonthTrxDateFirst, 'yyyy-MM-dd'), 'MM/dd/yyyy')# <br/>  "+
        " Sales: #=kendo.format('{0:C}',dataItem.Sales)# <br/> " +
        "Pct Sales: #=kendo.format('{0:P}',dataItem.Pct_Sales)# <br/> " +
        "GP Pct: #=kendo.format('{0:P}',dataItem.GP_Pct)# </div>"
    }
});
like image 61
CodingWithSpike Avatar answered Nov 28 '22 19:11

CodingWithSpike