我有FusionCharts 3.3.1-sr2.19840。如何逃避html代码的工具提示?如果我在工具提示中有一个<input>
,或者在<script>
中有一些警告,它会触发我的JavaScript代码...这是一个很大的问题。是否有可以逃避工具提示和标签的属性?
这是一个未提供工具提示的打印屏幕:
答案 0 :(得分:0)
你应该使用&#34;&amp; LT;&#34;和&#34;&amp; GT;&#34;逃避标签。我创造了一个解决问题的小提琴。 http://jsfiddle.net/subramaniashiva/4jgfeejx/
FusionCharts.ready(function () {
var ageGroupChart = new FusionCharts({
type: 'pie3d',
renderAt: 'chart-container',
width: '450',
height: '300',
dataFormat: 'json',
dataSource: {
"chart": {
"caption": "Split of Visitors by Age Group",
"subCaption": "Last year",
"paletteColors": "#0075c2,#1aaf5d,#f2c500,#f45b00,#8e0000",
"bgColor": "#ffffff",
"showBorder": "0",
"use3DLighting": "0",
"showShadow": "0",
"enableSmartLabels": "0",
"startingAngle": "0",
"showPercentValues": "1",
"showPercentInTooltip": "0",
"decimals": "1",
"captionFontSize": "14",
"subcaptionFontSize": "14",
"subcaptionFontBold": "0",
"toolTipColor": "#ffffff",
"toolTipBorderThickness": "0",
"toolTipBgColor": "#000000",
"toolTipBgAlpha": "80",
"toolTipBorderRadius": "2",
"toolTipPadding": "5",
"showHoverEffect": "1",
"showLegend": "1",
"legendBgColor": "#ffffff",
"legendBorderAlpha": '0',
"legendShadow": '0',
"legendItemFontSize": '10',
"legendItemFontColor": '#666666'
},
"data": [{
"label": "Teenage",
"value": "1250400",
"tooltext": "<input type=\"text\"> Teenage"
}, {
"label": "Adult",
"value": "1463300",
"tooltext": "<input type=\"text\"> Adult"
}, {
"label": "Mid-age",
"value": "1050700",
"tooltext": "<input type=\"text\"> Mid-age"
}, {
"label": "Senior",
"value": "491000",
"tooltext": "<input type=\"text\"> Senior"
}]
}
}).render();
});