【问题标题】:Kendo ui chart hide circle for data pointsKendo ui图表隐藏数据点的圆圈
【发布时间】:2013-10-03 11:25:33
【问题描述】:

我无法在 Kendo ui 中隐藏折线图的圆角。我确实想显示工具提示值但想隐藏圆圈。

以下示例来自演示站点:http://demos.kendoui.com/dataviz/line-charts/index.html

甚至,我不知道他们叫什么,所以我可以在此处的文档中找到:http://docs.kendoui.com/api/dataviz/chart

【问题讨论】:

    标签: charts telerik kendo-ui kendo-dataviz


    【解决方案1】:

    根据文档,您可以将 series.markers.visible 设置为 false:

    http://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/chart#configuration-series.markers.visible

    此外,您还可以更改它们的大小和形状。

    【讨论】:

      【解决方案2】:

      请尝试使用以下代码 sn-p。如果有任何问题,请告诉我。

      <style>
          #chart circle {
              display: none !important;
          }
      </style>
      <script>
          function createChart() {
              $("#chart").kendoChart({
                  title: {
                      text: "Gross domestic product growth /GDP annual %/"
                  },
                  legend: {
                      position: "bottom"
                  },
                  chartArea: {
                      background: ""
                  },
                  seriesDefaults: {
                      type: "line"
                  },
                  series: [{
                      name: "India",
                      data: [3.907, 7.943, 7.848, 9.284, 9.263, 9.801, 3.890, 8.238, 9.552, 6.855]
                  }, {
                      name: "World",
                      data: [1.988, 2.733, 3.994, 3.464, 4.001, 3.939, 1.333, -2.245, 4.339, 2.727]
                  }, {
                      name: "Russian Federation",
                      data: [4.743, 7.295, 7.175, 6.376, 8.153, 8.535, 5.247, -7.832, 4.3, 4.3]
                  }, {
                      name: "Haiti",
                      data: [-0.253, 0.362, -3.519, 1.799, 2.252, 3.343, 0.843, 2.877, -5.416, 5.590]
                  }],
                  valueAxis: {
                      labels: {
                          format: "{0}%"
                      },
                      line: {
                          visible: false
                      },
                      axisCrossingValue: -10
                  },
                  categoryAxis: {
                      categories: [2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011],
                      majorGridLines: {
                          visible: false
                      }
                  },
                  tooltip: {
                      visible: false
                  }
              });
          }
          $(document).ready(createChart);
      </script>
      

      【讨论】:

      • 所以,这就是诀窍:#chart circle { display: none !important; } 谢谢。
      • 如果我想减小半径/大小?我已经看到它们被呈现为具有属性“r = 4”的 标记,但我还没有找到减少它的方法。有什么建议吗?
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-05-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多