📅  最后修改于: 2023-12-03 15:02:17.306000             🧑  作者: Mango
jQWidgets 是一款基于 JavaScript 的 UI 库,其中的 jqxChart 组件提供了用于创建图表的 API。enableCrosshairs 属性是 jqxChart 组件中的一个属性,用于启用或禁用十字线。
$("#chart").jqxChart({
enableCrosshairs: true|false
});
$("#chart").jqxChart({
title: "Sales Report",
description: "The following chart shows the sales by product category",
enableAnimations: true,
enableCrosshairs: true,
toolTipShowDelay: 500,
theme: "energyblue",
source: dataAdapter,
xAxis: {
dataField: "Month",
showGridLines: true
},
seriesGroups: [{
type: "column",
columnsGapPercent: 50,
seriesGapPercent: 5,
valueAxis: {
unitInterval: 1000,
maxValue: 8000,
displayValueAxis: true,
description: "Sales in USD",
axisSize: "auto",
tickMarksColor: "#888888"
},
series: [{
dataField: "Products",
displayText: "Product Sales",
labels: {
visible: true,
backgroundColor: "#FEFEFE",
backgroundOpacity: 0.2,
borderColor: "#7FC4EF",
borderOpacity: 0.7,
padding: { left: 5, right: 5, top: 0, bottom: 0 }
}
}]
}]
});
该属性没有返回值,只是用于启用或禁用十字线。
# jQWidgets jqxChart enableCrosshairs 属性介绍
## 简介
jQWidgets 是一款基于 JavaScript 的 UI 库,其中的 jqxChart 组件提供了用于创建图表的 API。enableCrosshairs 属性是 jqxChart 组件中的一个属性,用于启用或禁用十字线。
## 语法
```javascript
$("#chart").jqxChart({
enableCrosshairs: true|false
});
$("#chart").jqxChart({
title: "Sales Report",
description: "The following chart shows the sales by product category",
enableAnimations: true,
enableCrosshairs: true,
toolTipShowDelay: 500,
theme: "energyblue",
source: dataAdapter,
xAxis: {
dataField: "Month",
showGridLines: true
},
seriesGroups: [{
type: "column",
columnsGapPercent: 50,
seriesGapPercent: 5,
valueAxis: {
unitInterval: 1000,
maxValue: 8000,
displayValueAxis: true,
description: "Sales in USD",
axisSize: "auto",
tickMarksColor: "#888888"
},
series: [{
dataField: "Products",
displayText: "Product Sales",
labels: {
visible: true,
backgroundColor: "#FEFEFE",
backgroundOpacity: 0.2,
borderColor: "#7FC4EF",
borderOpacity: 0.7,
padding: { left: 5, right: 5, top: 0, bottom: 0 }
}
}]
}]
});
该属性没有返回值,只是用于启用或禁用十字线。