I have a requirement to show different charts with different timezone on same page using highcharts.
Note: I konw highcharts supports global timezone offset but not for individual chart. So I can't use global options for showing graph in different timezone.
Related
I'm new to superset and discovering whether it is available to edit the tooltip in a line chart.
For example the line chart is with date as x-axis and price as y-axis, so the tooltip only shows these two information. But I want the tooltip also showing the cost without adding it to the chart. Is it able to accomplish it in superset?
I have a HighStock chart with the usual date/time on the x-axis. The chart might include multiple years of data.
When the user zooms in, HighCharts automatically formats the labels on the x-axis appropriately, showing month/year, or date/time, etc. It does a good job.
But when the user zooms in there is no indication of what year the data is they are looking at. See the following image:
It would be nice to show the year without having to make use of a formatter function (HighCharts is 99% there, why re-invent the wheel?). I guess this is as much a feature request as it is a question.
I have a use case where the client needs to see the previous date ranges stats overlaid on the current date range. This will allow them to easily compare current vs previous performance.
To do this I'm adding another series to the charts and retrieving the previous periods data. Previously, we then set the tooltip for the X value which was the current dates. I'm now needing to modify the tooltip to show the correct date value for each series such that a previous periods data point tooltip might look like:
12/1 : $4432.00
and the current periods data point:
1/1 : $21321.12
However it seems the charts are only capable of a single tooltip formatter instead of a per series formatter. If I continue to use the X axes label it will display the incorrect date on the previous periods data points. Using the above example would come out with 1/1 for the previous point:
1/1 : $4432.00
Is there a method by which I can set a tooltip format per series? Is there also any means by which we can modify and extend the underlying Highcharts?
I've found one solution for this function. Create a new XAxis and assign it to the Series.
XAxis xAxis = new XAxis();
xAxis.setCategories(categories);
xAxis.setOpposite(true);
configuration.addxAxis(xAxis);
series.setxAxis(1);
By adding the new XAxis the tooltip formatter can you use the same logic but receive different values depending on which axes the series is attached to.
I found setting the X axis by Integer a bit odd though. It should take the object imo but I suppose it needs to know which axis in the configuration's array to assign it to.
This solves the use case I have but won't be a solution if there are more than 2 axes to label.
I am trying to calculate the difference between the total of 2 stacked columns for which I am trying to access series data in tooltip formatter. Is there a way I can do that?
I want to show datalabels value using a standard format when export charts to any format in highcharts. I am providing a demo for a detailed explanation.