ZingChart: Is it possible to add an icon (png or svg) to the last data point?
ZingChart has the ability to create a valueBox at the end of each plot. You can then associate text and some image to the valueBox. In fact you can place the valueBox on the highest datapoint, the lowest and some combination of those. Here's the full list
Last Data point
{ type: 'line', plot:{ valueBox:{ //this can be set inside series for control per plot type: 'last', // this is what links the valueBox only to the last datapoint text: " ", height: 50, width: 50, backgroundImage: 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSOxgRza9oqQNDeMhTvBfmcknb3Mbf0ICqpWcOJMR3M8YAnuhpr', backgroundRepeat: 'no-repeat', shadow: false } },
Combination of Data Points
You can have a combination of valueBox objects.
-
read more about multiple valueBoxe's
{ type: 'line', plot:{ valueBox:[{ // first valueBox object is for min/max type: 'all', text: "%v", placement:'right', backgroundColor:'#fff', overlap:false // if flag overlaps remove },{ // second displays for all type: 'min,max', text: " ", height: 50, width: 50, backgroundImage: 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSOxgRza9oqQNDeMhTvBfmcknb3Mbf0ICqpWcOJMR3M8YAnuhpr', backgroundRepeat: 'no-repeat', shadow: false, overlap:false // if flag overlaps remove text },] },