score:2
I have previously built an application using Marionette and Highcharts so I think I can speak to this from some experience.
There's more than one way to go about this but in general unless you have some special reason you would just want to have one Marionette app running. I can't tell if you're trying to display two views at the same time in the same region but in case you are this is definitely not possible--as soon as you show the second view the first will be removed from the dom.
Anyways on to your questions: The simplest way (and the way I have done this) is to use an ItemView and draw the chart in the onRender() method. So it will look something like this:
var MyView = Marionette.ItemView.extend({
template: _.template('<div class="chart-container" style="height: 325px;"></div>'),
onRender: function() {
this.$('.chart-container').highcharts({
...highcharts options here
})
}
});
Then when you're ready to display it you'll create an instance and show it in the region:
var view = new MyView();
Graph1Manager.nameOfRegion.show(view);
Whenever you show another view in the region the previous one will automatically close so remember you'll have to create a new instance of it if you want to use it again...
Source: stackoverflow.com
Related Articles
- x-axis, y-axis lines does not appear, when I include 3D chart library of HighChart in my code
- Remove Export and print button plugin on highchart chart
- How to export a Highchart chart to PDF thanks to a button outside the chart?
- How to create a new Highstock chart with new Highchart and not jquery?
- Highchart Area Range chart with gradient that follows the line
- Highchart - Redraw Chart after Window is resized
- how to reset Highchart chart width in percentage on Button click
- highchart chart redraw method is not refreshing the chart
- Highchart Axis Update/ chart redraw
- How can I extend the lines of this Highchart series to the edges of my chart area?
- Adding a custom tooltip to a bubble chart / highchart
- How can I prevent my HighChart bar chart from being inverted?
- Produce dot chart in highchart
- Highchart columns chart overlaps yAxis.plotLines labels
- create a donut chart using highchart using jquery json object
- using angular directive to draw highchart pie chart but when i am using it in success function it is not working
- Customize Stacked column chart in highChart
- put the highchart legend to the bottom of the chart and horizontally centered
- Fire click event on a highchart column drilldown chart on clicking x axis for drill down reports
- Export chart image data locally in HIghchart
- Use MySQL data as the chart data for the cakephp highchart plugin
- I cant save my highchart chart data in localStorage
- How to add Legend in highchart compare stock chart
- Adding data to a highchart chart using an array with IDs
- Gauge chart Highchart dial style issue
- HighCharts Stock Chart error code 18
- Showing marker for separate values only in line chart in HIghchart
- Highchart showing indicator at last point for line chart
- hide a particular column on xAxis highchart Column Chart
- HighChart : plot line click event for multiple chart
- Highcharts: Negative values of the secondary axis should come below the x axis
- Highcharts plugin: show/hide tooltips on click
- Change SVG stroke options in Highcharts
- Need to generate random data for Highcharts series
- Change the zoom Type dynamically?
- In a Highcharts gauge graph, how can I position plotband labels centered?
- Highcharts : Showing wrong color in data series
- Basic jquery fiddle to Angular Directive
- How to get continuous graphs in Highstock (beta release)
- Highcharts legend hover for bar chart?
- position the markers in highcharts to custom coordinate
- How to Create synchronized High chart with different no of series per chart
- how to add copyright symbol in a highcharts title?
- javascript charting framework to plot two charts together
- column charts first date cut issue
- Sql query to populate 0's for missing data
- Highcharts sparklines from ajax-inserted data
- Showing only one tooltip for all. Highstock highcharts
- Highcharts to display area range and line chart with data from a CSV file
- Load json-data into Highchart