2

海,我已经配置了剑道股票图表。我遇到了工具提示的问题。如何获取日期为 1/2/2012 3:12:13 的自定义工具提示

function createChart() {
            $("#stock-chart").kendoStockChart({
                dataSource: {
                    serverFiltering: true,
                    transport: {
                        read: {
                            url: "http://demos.kendoui.com/service/StockData",
                            dataType: "jsonp"
                        },
                        parameterMap: function(data) {
                            return { filter: JSON.stringify(data.filter) };
                        }
                    },
                    schema: stockDataSchema
                },
                title: {
                    text: "The ACME Company"
                },
                dateField: "Date",
                series: [{
                    type: "column",
                    field: "Open"

                }],
               tooltip: {
                visible: true,
                 template: "Time:${category} - Mode:${value}"

        },
                navigator: {
                    dataSource: {
                        transport: {
                            read: {
                                url: "http://demos.kendoui.com/service/StockData",
                                dataType: "jsonp"
                            }
                        },
                        schema: stockDataSchema
                    },
                    series: {
                        type: "column",
                        field: "High"
                    },
                    select: {
                        from: "2009/02/05",
                        to: "2011/10/07"
                    }
                }
            });
        }

        $(document).ready(createChart);
        $(document).bind("kendo:skinChange", createChart);

这是工作的 Js Fiddle:http: //jsbin.com/ilemel/54/edit

4

1 回答 1

3

试试这个,

演示:http: //jsbin.com/ilemel/56/edit

tooltip: {
                visible: true,
                 template: "Time:#= kendo.format('{0:dd/MM/yyyy}',category) # - Mode:${value}"

        },
于 2013-09-04T10:35:57.723 回答