How to add different highcharts theme to different charts - highcharts

I want to add different highcharts theme to different charts which are defined within a variable. I am trying to add Highcharts.setOptions(Highcharts.theme1) inside the charts defined within a variable but it is not showing the chart if i am doing this.

Related

Charts in Vaadin14 don't seem to automatically resize when in splitlayout windows

In Vaadin 14.4.2, I have a scenario in which I have added a chart inside a splitLayout. However, when I, as a user, expand or shrink the splitLayout, the corresponding chart does not resize. The other components, such as the grid do automatically resize. Is there some "magic" configuration option to get the chart to behave like other components? (The screenshot below shows the chart not having resized, even though the grid beneath it did properly automatically resize.) (Also fyi, I call this: spectraChart.setSizeFull(); so the chart should be using up all the available space.) (Another FYI: I could probably "trap" the splitLayout resize even then redo the plotting, but it seems to me that this should ideally not be necessary in the a 'framework' solution such as Vaadin, since a chart is a component that should behave like other components, such as the grid.)
Yes, unfortunately that is true. You can workaround the issue by doing explicit JavaScript call to Charts to reflow when splitter position has been changed. The code snippet below finds all charts and reflows them:
innerLayout.addSplitterDragendListener(event -> {
getUI().ifPresent(
ui -> ui.getPage()
.executeJavaScript(
"Array.from(window.document.getElementsByTagName('vaadin-chart')).forEach( el => el.__reflow());"
));
});

Dynamic Vaadin chart

Is there a way to modify a Vaadin chart by moving a bar or a point from the chart itself? i.e. I have a bar chart with a certain value in one of the bars, I want to get a new value by dragging that bar to that new value.
There is something similar in this example, that is why I wonder if it is possible to extend this option to something like what I need.
Thanks!!!!
I assume that vaadin uses Highcharts if this is the case, maybe you can use plugins, if so I recommend:
http://www.highcharts.com/plugin-registry/single/3/Draggable%20Points
Source code in case you had to rewrite it:
https://rawgit.com/highslide-software/draggable-points/master/draggable-points.js
Regards.

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.

charts in Partial view

I want to create partial views such that each partial view corresponds with one type of chart (say bar chart, pie chart etc.). The chart should be generated on the partial view just by passing the model to it.
I am working on the charts for the first time so not very much aware of the components/libraries available. All the example I seem to find on internet works by creating all the charts at the time of requirement and saving the for further use. Eg. http://czetsuya-tech.blogspot.in/2012/02/how-to-render-chart-object-in-view-in.html#.Uk_r_oaGoUU
Please let me know if any clarification is required.
While searching for similar thing I found the following that I think could be helpful to you as well:
http://forums.asp.net/t/1874913.aspx

how to create simple schedule chart with highchart

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.

Resources