gpt4 book ai didi

javascript - 使用 KendoUI Charts,如何使 Legend 项目成为超链接?

转载 作者:行者123 更新时间:2023-11-29 20:09:58 25 4
gpt4 key购买 nike

我正在使用 KendoUI 并创建了以下图表。在这种情况下,我需要能够使图例项“产品 1”成为超链接。我该怎么做?

我的标记:

<div id='chart' ></div>​

我的脚本:

 jQuery('#chart').kendoChart({
seriesDefaults: {
type: "line",
missingValues: "interpolate"
},
legend: {
position: "bottom"
},
valueAxis: [{
title: {
text: "Score"
},
min: 75,
max: 90,
},
{
name: "hidden",
visible: false,
min: 75,
max: 90},
{
name: "ProductSurveys",
min: 15,
max: 55,
title: {
text: "Survey Count"
},
color: "#4c4c4c"}],
series: [{
type: "line",
name: "<a href='http://jsfiddle.net/rodneyhickman/wCB5a/' >Product 1</a>",
color: "#004990",
width: 1,
markers: {
background: "#004990"
},
tooltip: {
visible: true,
template: "<b>Product 1</b><br/>Current Score: #= value #<br/>#= category # "
},
data: [87.11, 87.27, 87.21, 86.84, 85.47, 84.87, 84.52, 85.19, 85.19, 85.2, 84.68, 83.78, 82.14]},
{
type: "line",
name: "Market Segment Average",
color: "#da7633",
width: 1,
markers: {
background: "#da7633"
},
tooltip: {
visible: true,
template: "<b>Market Segment Average</b><br/>Current Score: #= value #<br/>#= category # "
},
data: [77.73, 77.27, 77.22, 76.68, 76.19, 75.7, 75.86, 76.09, 76.33, 76.15, 75.75, 75.4, 75.9]},
{
type: "column",
data: [50, 48, 48, 46, 46, 48, 49, 46, 39, 37, 36, 34, 27],
name: "Survey Count",
color: "#e9eafe",
axis: "ProductSurveys"}],
categoryAxis: {
labels: {
rotation: -45,
step: 1,
skip: 0
},
categories: ["Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "Jan - 2012", "Feb", "Mar", "Apr"],
axisCrossingValue: [0, 0, 100, 100]
}

});

这是我失败尝试的 jsFiddle 项目:http://jsfiddle.net/wCB5a/1/

任何帮助将不胜感激。

最佳答案

Telerik 让我知道此功能目前在 KendoUI(版本 2012.1.233)中不存在,但该功能已被注意到并且可能会出现在未来的版本中。

我解决这个问题的方法是隐藏图例。使用超链接创建我自己的图例。

关于javascript - 使用 KendoUI Charts,如何使 Legend 项目成为超链接?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10416200/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com