小编Bla*_*ake的帖子

旋转Flot Tick标签

我正在尝试将图表底部的日期旋转为垂直与水平.我正在使用flot-tickrotor,但它似乎无法正常工作.

 xaxis: {
   rotateTicks: 110,
   mode: "time",
   timeformat: "%m/%d",
   minTickSize: [7, "day"],
   ticks: cpudatearray
 }
Run Code Online (Sandbox Code Playgroud)

最终结果不正确,一切都显得混乱. 在此输入图像描述

c# sql graph flot

5
推荐指数
1
解决办法
5468
查看次数

如何在FLOT中的图例项之间添加空格?

我有下面的图表,我想在图例项之间添加空格.我尝试将空格附加到传递给标签的字符串,但没有成功.有任何想法吗?TIA

图形 code

       $(document).ready(function() {
            $.plot($("#NR"), NRLine,  {
                grid: {
                    backgroundColor: "#E5E5E5",
                    hoverable: true
                },
                xaxis: {
                    mode: "time",
                    timeformat: "%m/%d",
                    minTickSize: [7, "day"],
                    ticks: datearray


                        },
                        legend: {


                        noColumns: 4,
                        container: $("#chartLegend")} 


    }
     );
        });     
Run Code Online (Sandbox Code Playgroud)

code

html jquery flot

2
推荐指数
1
解决办法
2162
查看次数

Ajax数据到FLOT图表的格式是否正确?

我知道有几个关于此的帖子,但我想我错过了一些东西.我在ajax调用中返回下面的数据,但它似乎不是FLOT的正确格式.是否有更好的格式来返回数据或应该更改FLOT以识别它?TIA

<script type="text/javascript">
     $(document).ready(function() {
         // Add the page method call as an onclick handler for the div.
         $("#Result").click(function() {
             $.ajax({
                 type: "POST",
                 url: "WebTest.aspx/GetData",
                 data: "{}",
                 contentType: "application/json; charset=utf-8",
                 dataType: "json",
                 success: function(msg) {
                     // Replace the div's content with the page method's return.

                     var jsObj = []
                     jsObj.push($.parseJSON(msg.d));

                     $.plot($("#Result"), jsObj, {
                         grid: {
                             backgroundColor: "#E5E5E5",

                             mouseActiveRadius: 20
                         }


                     }
                 );
                 }
             });
         });
     });
</script>


[WebMethod]
public static string GetData()
{

    DataLines dataLine1 = new DataLines();
    DataLines dataLine2 …
Run Code Online (Sandbox Code Playgroud)

c# ajax flot

2
推荐指数
1
解决办法
2652
查看次数

标签 统计

flot ×3

c# ×2

ajax ×1

graph ×1

html ×1

jquery ×1

sql ×1