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 Query
- 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
- Background color for multiple Highchart panes, in Vue app
- 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
More Query from same tag
- HighCharts animation android
- Scatter chart with simple liner regression
- Adding image in highchart
- Highcharts two charts on page
- Highcharts column width on a time series axis
- Region Boundary in Scatter Chart in Highcharts
- How to remove bullet from tooltip when using highchart?
- Creating 0-50-100 percentile area line graphs that use 50 as the threshold for negative
- How Highcharts ChartView redraw or wait for AsyncTask data in Android
- Multiple click events on multiple axes chart?
- I was working on highcharts and react and want to built something like this with highcharts. Is it possible?
- How to show difference in scatter chart with plots at same position in highchart
- Adding text dynamically to point popups in highcharts.js
- Highchart: Spline with clickable Symbols
- how to display array of objects in High stock charts
- How to set a Maximum yAxis range for HighChart graph?
- Adding regression to multiple series imported from CSV
- how to center text inside donut chart embedded in combination chart
- Safari browser displaying invalid date for highcharts
- Highchart pie vertical legend align right not pinned to plot correctly
- Highcharts DateTime Localization
- Using modified JS version in Highcharts to bring back the pre-3.0 export buttons
- I want delete the values from the series so that the graph is not cluttered how to do that
- Highstock type 'candlestick' - Change bordercolors
- Highcharts Spline: Custom chart marker, on a staggered interval, across the plotted line?
- Ajax Request to Insert Highcharts into Head and Run Function
- How i can increase size of legends in line Highchart
- Highcharts multiple yAxis, the second yAxis labels are not showing but the title is
- Enable all range selector's options in stock highcharts
- php: laravel slow view render time when rendering javascript for highcharts