Hi, you're seeing this because you're formatting the dates manually
yourself, when you calculate your column. Instead of doing return
dt.getValue(row, 2).toString(), you may want to do something more complex
there.

- Sergey


On Tue, Sep 17, 2013 at 8:18 AM, khamosh <[email protected]> wrote:

> this is my code ...
>
> in this part i get the query on my dataTable :
>
> function createQueryCityName(strUser) {
>     var query = new google.visualization.Query ("
> http://api.XXXX.com/XXXX/datasource?table="+strUser+"_physics";);
>     console.log(query, typeof (query));
> return query;
> }
> ....
> and in this part i send it for drawing :
>
> function drawDashboard() {
>    //console.log(zoneView.toDataTable().toJSON());
>    // Create a dashboard.
>    var dashboard = new
> google.visualization.Dashboard(document.getElementById('dashboard_div'));
>
>    // Create a range slider, passing some options
>    var donutRangeSlider = new google.visualization.ControlWrapper({
>        "controlType": "ChartRangeFilter",
>        "containerId": "filter_div",
>        "options": {
>            "filterColumnLabel": "physics_reportings_timestamp",
>            ui : {
>                chartType: "ComboChart",
>                chartOptions: {
>                    chartArea: {
>                        //width: '85%' // this should match chartArea.width
> of the chart
>                  height : 40,
>                      width : 400,
>                    }
>                },
>                chartView: {
>                    columns: [2, 3, 4]
>                },
>            }
>        }
>    });
>
>    // Create a Combochart, passing some options
>    var ComboChart = new google.visualization.ChartWrapper({
>        "chartType": "ComboChart",
>        "containerId": "chart_div",
>        options: {
>            chartArea: {
>                // percents work fine in the chartArea
>    height : 200,
>    width: 400, // this should match chartArea.width of the control
>
>            },
>            hAxis: {title: "Month"},
>            seriesType: "line",
>
>           /* legend: {
>             position: 'right'
>         },*/
>            series: {
>                0: {
>                    // make this a "line" series
>                    type: "line",
>                    color: "#FC0519",
>                    // use the left axis
>                    targetAxisIndex: 0
>                },
>                1: {
>                    // make this a "line" series
>                    type: "line",
>                    color: "#4E0AFA",
>                    // use the left axis
>                    targetAxisIndex: 0
>                },
>                2: {
>                    // make this a "line" series
>                    type: "line",
>                    color: "#010101",
>                    // use the right axis
>                    targetAxisIndex: 1
>                },
>               3: {
>                    type: "steppedArea",
>                    lineWidth: 0,
>                    color: "#00FF00",
>                    enableInteractivity: false,
>                    targetAxisIndex: 2
>                },
>                4: {
>                    type: "steppedArea",
>                    lineWidth: 0,
>                    color: "#FFFF00",
>                    enableInteractivity: false,
>                    targetAxisIndex: 2
>                }
>            },
>            vAxes: {
>                // assign options for the left axis
>                0: {
>                    title: "Temperature(Deg C)"
>                },
>                // assign options for the right axis
>                1: {
>                    title: "Power(kW)"
>                },
>                2: {
>                    // hide this axis froim view
>                    textPosition: "none",
>                    gridlines: {
>                        count: 0
>                    }
>                }
>            }
>        },
>        view: {
>            columns: [
>                      {
>                 //transform the numbers into strings, so the steppedArea
> series will work
>                type: "string",
>               label: zoneView.getColumnLabel(2),
>                calc: function (dt, row) {
>                   return dt.getValue(row, 2).toString();
>               }
>            },
>             3, 4, 5, 6, 7]
>        }
>    });
>
>    dashboard.bind(donutRangeSlider, ComboChart);
>
>    dashboard.draw(zoneView);
>
>
> }
>
> and this is my JSON :
>
>
> [{"id":"ecoadmin_building_name","label":"ecoadmin_building_name","type":"string","pattern":""},{"id":"ecoadmin_zone_name","label":"ecoadmin_zone_name","type":"string","pattern":""},{"id":"physics_reportings_timestamp","label":"physics_reportings_timestamp","type":"datetime","pattern":""},{"id":"physics_reportings_outdoor","label":"physics_reportings_outdoor","type":"number","pattern":""},{"id":"physics_reportings_indoor","label":"physics_reportings_indoor","type":"number","pattern":""},{"id":"physics_reportings_energy","label":"physics_reportings_energy","type":"number","pattern":""},{"id":"physics_reportings_presence","label":"physics_reportings_presence","type":"number","pattern":""},{"id":"physics_reportings_daylight","label":"physics_reportings_daylight","type":"number","pattern":""}],"rows":[{"c":[{"v":"XXXX"},{"v":"XXXX"},{"v":new
>  
> Date(2012,11,8,0,4,53)},{"v":3.6},{"v":13.2},{"v":0.0},{"v":0.0},{"v":0.0}]}..................................
>
>
>
> On Tuesday, September 17, 2013 2:01:17 PM UTC+2, khamosh wrote:
>>
>>
>>
>> On Tuesday, September 17, 2013 9:18:45 AM UTC+2, khamosh wrote:
>>>
>>> hello every body, i have a problem i have a ComboChart that get the data
>>> from my JSON but in my JSON  the format of my date is like this " Fri Aug
>>> 23 2013 05:04:53 GMT+0200 (Romance Standard Time) " and i don't want to see
>>> all of this in my chart just i want to see "  Aug 23 2013 05:04:53 " how
>>> can i do it?
>>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Google Visualization API" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to
> [email protected].
> Visit this group at
> http://groups.google.com/group/google-visualization-api.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to