Is it possible to add a tooltip when hovering over a drawing (annotation) using stock charts of Anychart - annotations

I would like to know if there is anyway to add a tool-tip while hovering over an annotation or a drawing using stock charts i anychart.
for example, if i draw a rectangle, i would like to show a tool-tip to with the values of the rectangle(start and end dates, and upper and lower price).
if there aren't any built-in functions to do so, are there any event listeners for hovering over an annotation? then maybe when the event of hovering the mouse-in i could create an html element and then hide it on the even of mouse-out.
another solution might be by creating labels on the xAxis and on the yAxis. but i could not find anything to add labels in a specific location.
any suggestion is appreciated.

Unfortunately, the current version of the library 8.7.0 doesn't support tooltip or events to implement custom interactivity with Stock chart annotations.
If you want to add labels on the axes, you can use text axis markers. The article is about basic charts, but it will work for Stock charts. The difference is that you should call API not from a chart, but from Stock chart plot.
For example chart.textMarker() should be replaced with chart.plot(0).textMarker(), and that's it.

Related

Is it possible to hide/show line chart with a toggle button in VizFrame

Apologies in advance, I cannot share the code. I do have a screenshot.
[Screenshot][1]
I am using VizFrame vizType 'combination' which is a combination of columns and lines. I want to be able to hide/show just the line charts for the user to have an option. I have looked everywhere but cannot find a way. All I am able to do is hide data point labels which is not my requirement.
But please let me know if this is possible? If so, how can I can hide/show a line chart on click of a toggle button I have in my toolbar.
I'm using ui5 version 1.52
I'm afraid that if you cannot find a way to do that it means that it's not possible with the standard version of the control.
You have two options:
Extend the current VizFrame control you're using in order to
override/implement what you need
Use a third-party control to
display charts. I would recommend you to check out my implementation
of openui5-chartjs

How to position legend chart labels?

Is it possible to change the default positions of the legend labels around the jasper reports charts? Currently I have a following kind of chart being created:
I would like to move this [hoursNormal, hoursTravel, hoursOvertime]-box from under the chart to the right side of the chart. Another thing I would like to do is to replace this [hoursNormal, hoursTravel, hoursOvertime]-box by label "month". I just don't see any tools for moving these positions in Jasper studio chart creation wizard, and to me also the xml looks like so static that I don't believe tinkering it would help me.
Hopefully I'm wrong and there is a easy solution?
Move the legend to the right and other option of the chart can be find in the Properties View.
Click the chart, to view Properties for the chart. Navigate the different properties tabs to set what you need.
Example
If you need more advanced feature on the chart you need to use a customizer class see this as example: How to put benchmark line on barchart?

Make labels of ChartJS radar in a few rows

I create radar chart with ChartJS.
But when I have long labels than ChartJS scale chart and make it smaller.
The question is – can I make label text with ChartJS radar in a two rows? (usual <br>,/n doesn't work).
Seems like documentation doesn't provide this possibility.
You can use custom tooltips to use HTML elements to display the tooltip instead of canvas elements.
There is an example at https://github.com/nnnick/Chart.js/blob/v1.0.2/samples/pie-customTooltips.html for pie charts that does this.

Is it possible to install circular avatar in place of axis text labels

I've got a requirement to install people's faces on the Y-Axis of a bar chart. Is it possible to install a custom image in place of the axis label? Ideally the solution would enable border-radius, border-style, and image URL properties.
Bonus points if you can point me towards documentation for enabling image-axis-label click & mouseover events!
There is an example of using images as labels here:
https://www.rgraph.net/demos/bar-images-as-labels.html
But keep in mind that they're not DOM objects - ie you can't style them with CSS on add mouseover events to them (at least not in the standard way). You could add a mouseover using RGraph though.

Fusion charts dynamic clickable

I have a scenario where in I am using fusion chart which has a multiple line chart in one fusion chart. I want to create a clickable line chart where in clicking on label that particular attribute will be displayed in graph. So basically each line chart in graph is dynamically displayed with click of button for each line chart. I hope you get my requirement. Any help will be really appreciated.
I hope I have understood your requirement correctly.
As far as I know, FusionCharts v3.2 has something similar to what you require.
From the documentation,
Interactive legends in charts that allow for selective showing/hiding of data series (or slicing, in case of pie charts)
You can see a demo of this at FusionCharts gallery