I'm using a bar chart and want to get the house targeted, how can I do that?
enter code here https://jsfiddle.net/yz1Lcedk/13/
Related
I have a horizontal bar chart where one of the bars on the chart needs to be dynamic based on a user selection of checkboxes in a google sheet. I can get this to work with one checkbox "=IF(C5=TRUE,D5+100,100)" but not sure how to get to work when multiple check boxes are selected.
enter image description here
I have a "Base UPH" of 100 and just need to add the values in the "Multiplier" column if the checkbox(s) are TRUE. The idea is that the user could select one or all of the checkboxes and see how the "C-Dynamic" would be improved.
Any tips, much appreciated Thanks!
Able to get to work, but only for a single checkbox with this formula: =IF(C5=TRUE,D5+100,100)
You could do it with SUMIF, like this:
=100+SUMIF(C5:C8,TRUE,D5:D8)
I have a charts done in highcharts in which I show and hide series depending on a checkbox (if the user clicks on a checkbox and all series are shown, if he unchecks the checkbox, some series are hidden).
It is working great.
Now I have an issue with the legends in the chart: if the series are hidden and the users enables a legend, the segment of all series (hidden or not) are shown in the chart.
I would like to handle the click item so I only handle series that are being shown.
To do that, I created an eventhandler for the legendItemClick event.
Inside it, I am able to access the legend (using this) but I am only able to call functions in a legend level, affecting all series. Is there anyway I could get to a series level?
Thanks!
Edit: created a jsfiddle as an example: http://jsfiddle.net/JLkGm/1/
Steps to reproduce:
1- unmark the checkbox
2- click twice in john + joe
Note that the segment related to Jane + Janet will show up
I would like to prevent this segment from showing if the checkbox is not checked.
ps: sorry for the js code in the checkbox event handler, we are using coffeescript, the original code was this one
toggleCompareData: (toggle) ->
columnName = COLUMN_HIGHCHARTS_TOKEN + #secondaryPrefix
if toggle
for serie in #chart.series
serie.show() if serie.stackKey is columnName
else
for serie in #chart.series
serie.hide() if serie.stackKey is columnName
It looks like bug, reported to our developers here: https://github.com/highslide-software/highcharts.com/issues/3309
I want to display a tooltip when I click a line graph, along with the usual tooltip with the value.
Is there any way to link from the canvas to the key area?!
Are you referring to the interactive key?
http://www.rgraph.net/docs/interactive-keys.html
It's not a tooltip though - it highlights an entry on the key.
EDIT:
There's an example of a poly object that has been positioned to sit over the line(s) and which when clicked highlights the appropriate key entry. It wasn't simple to accomplish (lots of playing with coordinates) - but neither was it like trying to remember your wifes birthday when drunk:
http://www.rgraph.net/tests/spline-key-clickable.html
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.
How do I create a simple chart with a single horizontal bar. Xaxis is time and yaxis is one category named execution. I want to show a chart that shows a bar during the times when I have state executing and for states in between I want to display a blank in the same horizontal bar.
What you are looking for, I think, is a Gantt chart. Check out this example: http://jsfiddle.net/highcharts/KNGba/. It is a basic chart with just one element. Now check out this one: http://jsfiddle.net/highcharts/r6emu/. This shows you events during a time line.