Programmatically set rangeSelector in Highcharts - highcharts

I've defined several buttons for the range selector (1d, 7d, 1m, 3m, 1y).
And they work as expected.
But I want to change the zoom level programmatically because depending on which item I select, the zoom level should have a different default. I don't see anything in the docs that do this.

You can call range selector button's click event programmatically like this:
chart.rangeSelector.buttons[X].element.onclick();
where:
chart is the variable that refers to the chart object
X is the index of the range selector button

Related

tooltip for checkboxGroup or radioGroup in repeat control

I have a repeat control bound to a (multi column) viewScope array.
The idea is that the chekboxGroup value will come from the first column and that the tooltip will come from the second column from the array.
The first thing (checkbox value) is not the problem. (see code)
The second thing is:
How can I assign the correct tooltip to the correct checkbox ?
<xp:repeat id="repeat4" rows="100" value="#{viewScope.choices}"
indexVar="rownumber" var="row" first="0">
<xp:checkBoxGroup id="checkBoxGroup2" layout="lineDirection">
<xp:selectItems>
<xp:this.value><![CDATA[#{javascript:return viewScope.choices[rownumber].get(0)}]]></xp:this.value>
</xp:selectItems>
</xp:checkBoxGroup>
<xe:tooltip id="tooltip1" for="checkBoxGroup2">
<xe:this.label><![CDATA[#{javascript:return viewScope.choices[rownumber].get(1)}]]></xe:this.label>
</xe:tooltip>
</xp:repeat>
EDIT
It seems that the tooltips work but are displayed off screen.
How do I manage to display them at the correct spot ?
Add position="before" or position="above" or position="below" to your tooltip control.
<xe:tooltip id="tooltip1" for="checkBoxGroup2" position="before">
By default it is "after" and this is outside the visible area in your example.

ALV tooltip in a single cell of a row. Possible?

It is possible to put a tooltip on a single cell of my alv? I know that it is possible in a column by a field catalog, but what about single cell?
I have ALV with icon like that, which is called via cl_gui_alv_gridv
I want information about this item in tooltip when I hover mouse over this icon
The information on how to display a symbol with a tooltip is easily available if you google for "site:help.sap.com tooltip icon". Since you seem to be unable to find it, here is the actual link. Make the target field large enough (132 characters is a common size), then use the function ICON_CREATE.
If you don't want an icon to appear, you can use ICON_SPACE. And since the tooltip is contained in the value of each cell, of course it is possible to have different tooltips for different cells.

Highstock table data: navigable with the range selector and the navigator - scrollbar

Anyone had created a table view, not creating a chart from a table, but a pure table grid view using the highstock library?
I need to be able to navigate in time (table grid get updated dynamically, like chart does) using the navigator-scroll-bar and range selector. Basically just replace the chart by a pure HTML table grid of data.
It needs to be done with highstock chart, probably not highchart library, coz I am looking for time navigation component to update the table accordingly to new time range changes...
I guess this could be achieved with callbacks on the navigator and range selector?
You need to catch afterSetExtremes, get all visible serie's data from chart.series (between min/max values which limit range) and return table in defined i.e div.

How to toggle on/off a chart series using the Shinobi iOS SDK?

My chart is composed of multiple chart series. I have created a custom legend with buttons so the user can press a button and show or hide a chart series as desired. I have implemented a solution where the number of series are redefined after each button press but this requires a call to reloadData which is an expensive operation.
How do I hide a chart series without calling reloadData? I am looking for a solution that only requires the chart to be redrawn using redrawChart.
SChartSeries objects (from which all series types inherit) have a hidden property. You can set this property to NO or YES to show or hide the series. You must call redrawChart after changing the value.
For example, the following method toggles the visibility of the first series in a chart:
- (IBAction)handleTogglePressed:(id)sender {
SChartSeries *series = _chart.series[0];
series.hidden = !series.hidden;
[_chart redrawChart];
}

highstock - control when tooltip appears

By default, the tooltip appears as soon as the cursor enters the chart. I would like to control when it first appears in one of two ways:
Wait for user to hover over (around) a data point on the chart.
This way the user can look at the entire chart without the
distraction of the tooltip.
mousedown - is there a way to disable the default mousedown function
and use it for displaying the tooltip instead? And because the
tooltip and crosshair seem to be joined, perhaps the same mousedown
event could fire the crosshair to appear?
number 2 would be best; any suggestions/solutions would be appreciated!
Number 2 is possible to achieve by:
disable default Highcharts tooltip
create point.click event handler
in above handler, create your own tooltip (it's simple div with some CSS)
make proper position for tooltip (accessed via this.point.plotX and this.point.plotY

Resources