To improve development efficiency, third-party commercial chart controls are increasingly widely used by programmers, and because of the reusability of third-party commercial control products, they can help enterprises to save the pressure of GUI engineers and realize flexible and brilliant charts.
Download the installation trial before reading the following article:
Fusioncharts xt Beta Download: http://www.componentcn.com/kongjianchanpin/tubiao/jibentubiaokongjian/2014-10-30/475.html
In a chart application, there is often more than one chart sequence in a chart plot area, in order to see the changes and data of a chart more clearly and intuitively, the other charts need to be hidden, and the Fusioncharts XT provides this functionality to the customer, when the customer clicks the icon of a chart in the legend, The chart will be hidden and the chart will appear again when you click it again, depending on the following section of the code:
{
"Chart": {
"caption": "Comparison of Quarterly Revenue",
"Subcaption": "Last year Vs this year",
"Xaxisname": "Quarter",
"Yaxisname": "Revenue (in USD)",
"Numberprefix": "$",
"Theme": "Fint",
"Legendbgcolor": "#CCCCCC",
"Legendbgalpha": "20",
"Legendbordercolor": "#666666",
"Legendborderthickness": "1",
"Legendborderalpha": "40",
"Legendshadow": "1"
},
"Categories": [
{
"Category": [
{
"Label": "Q1"
},
{
"Label": "Q2"
},
{
"Label": "Q3"
},
{
"Label": "Q4"
}
]
}
],
"DataSet": [
{
"Seriesname": "Last year",
"Initiallyhidden": "1",//Can hide the chart when initialized
"Data": [
{
"Value": "10000"
},
{
"Value": "11500"
},
{
"Value": "12500"
},
{
"Value": "15000"
}
]
},
{
"Seriesname": "This year",
"Data": [
{
"Value": "25400"
},
{
"Value": "29800"
},
{
"Value": "21800"
},
{
"Value": "26800"
}
]
}
]
How to use a chart control to hide a chart sequence by clicking the legend icon