Highcharts tootip for stacked bar charts - highcharts

I have a 3 stacked bar charts for each element is there any options to show a tooltip to show individual shared tooptip for each stack bar.
For Eg : If there are 3 stacked bar charts for each element showing
Bar 1 (A,B,C,D)(stacked)
Bar 2 (E,F,G,H)(stacked)
Bar 3 (I)(normal bar)
I want to show a tooptip for each bar eg showing (A,B,C,D) on mouse over of Bar1
and showing (E,F,G,H) on mouse over Bar 2 and showing (I) on mouse over Bar 3 with their series name.
Can some one help me on this ?

You can use shared parameted for tooltip
http://jsfiddle.net/nAkWg/
tooltip: {
shared:true
},
http://api.highcharts.com/highcharts#tooltip.shared

Related

Highchart Bar table tooltip dissapears on hovering the tooltip

https://www.highcharts.com/demo/column-stacked
Highcharts is a JS API that allows you to easily generate bar charts. The above link shows a Highchart stacked column table. The bars show some information in a tooltip when you hover on them. Highchart allows us to control the delay of the tooltip with this JS parameter hideDelay: number but there is no such parameter to hold the tooltip when you hover on it.
What I want is to make the tooltip stay even when I hover on it. Tooltip only stays when I hover on the bars and disappears a few minutes after I take my cursor away from the bar.
Set plotOptions.series.column.stickyTracking to true.
plotOptions: {
column: {
stacking: 'normal',
stickyTracking: true
}
},
jsFiddle
API Reference: https://api.highcharts.com/highcharts/series.column.stickyTracking

Is there a way to show value of the bar graph on hovering mouse over the individual bar in JFreeChart

I have created a bar graph using the JFreeChart but is there a way to show the value of the bar graph on hovering the mouse over the individual bar.I am able to show the static value in the image using toolTipGenerator but it becomes quite messy if I have more data, so I was thinking to show the value of the individual bar graph on hovering mouse over the bar.
Below is my code for generating the bar graph.
CategoryItemLabelGenerator labelGenerator = new StandardCategoryItemLabelGenerator("{2}",
new DecimalFormat("0"));
BarRenderer renderer= new BarRenderer();
renderer.setBaseItemLabelGenerator(labelGenerator);
JFreeChart barChart3D = ChartFactory.createBarChart3D("the graph name", "X-axis",
"Y-axis", dataset, PlotOrientation.VERTICAL, true, true, false);
CategoryPlot plot = barChart3D.getCategoryPlot();
plot.getDomainAxis().setCategoryLabelPositions(CategoryLabelPositions.UP_45);
barChart3D.setAntiAlias(true);
StandardCategoryToolTipGenerator toolTipGenerator=new StandardCategoryToolTipGenerator("{2}",
new DecimalFormat("0"));
renderer.setBaseToolTipGenerator(toolTipGenerator);
toolTipGenerator.generateToolTip(dataset, row, column)
renderer.setBaseItemLabelsVisible(true);
barChart3D.getCategoryPlot().setRenderer(renderer);
XYLineAndShapeRenderer xylineandshaperenderer= new XYLineAndShapeRenderer();
xylineandshaperenderer.setBaseToolTipGenerator((XYToolTipGenerator)new ItemGenerator());

Core Plot Bar - Legend for just a few bars

I have one Bar Plot. This bar graph has ten bars but I just want to present the caption of only first 3 bars.
I even tried adding in an NSArray assistant the first three plot but without success.
Some help? idea? criticizes?
Thanks
Implement one of the following methods in your datasource:
-(NSString *)legendTitleForBarPlot:(CPTBarPlot *)barPlot
recordIndex:(NSUInteger)idx;
-(NSAttributedString *)attributedLegendTitleForBarPlot:(CPTBarPlot *)barPlot
recordIndex:(NSUInteger)idx;
Return a title for the bar index if you want it to appear in the legend or nil to exclude that bar from the legend.

How to customize tab bar item image on runtime

I need to change the image of the tab bar item based on one of the option selected in my first tab at runtime. Whenever user changes the option the tab bar item image should change.
For example: I have 3 tabs. In first tab I have following options:
"Red"
"Green"
"Blue"
According to the option which user selects, the tab bar item image should change. (ie. for red, all 3 tabs should have red icons and so on)
How can I achieve this?
Thanks for helping :)

How can I control legend items through a custom button in Highcharts?

I'm looking for a way of controlling legend items through my custom button.
The button will be placed out of the canvas area.
How can I get a list of legend items, and toggle them through checkboxes?
By doing that, I can give users more spaces to see graphs.
Thanks,
Sung Am YANG
You can look at the legend item names using
chart.series[0].name
chart.series[1].name
To toggle axes on and off, use
chart.series[0].show()
chart.series[0].hide()
e.g. http://jsfiddle.net/BasRN/ shows hiding and showing the first series with buttons, including setting the button text to the series name.

Resources