简体   繁体   中英

Writing point values of a Shield UI chart to an element on the page

I need to modify the Shield UI Chart so, that first there are no labels shown (tooltips) when the user moves the mouse over the data points. In my case there are bars used. And in addition I need the values of the point, pointed to with the mouse to be shown on the web page, containing the chart.

You need to do the following: 1. you need to disable the tooltips for the chart by using:

tooltipSettings:{    
    enabled:false
}.

Then you need an element on the page, where to place the information. It could be defined so:

    <p id="info"></p> 

and can be initially blank.

Finally we need to place some code in the desired event, in our case this will be:

 events: {
 seriesMouseOver: function pointSelectHandler(args) {
 var Information= "Point Value: " + args.point.y;    
 document.getElementById("info").innerHTML="Current Point Value:"+Information;        
    },
 }. 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM