Export with additional options Highstock - highcharts

I am using Highstock 1.2.5.
These are the options I have with my chart.
I am adding colors to yAxis using axis.addPlotBand based on certain conditions.
Also, I am using axis.addPlotLine to draw line some plot values.
Both, these options are set after chart is drawn. As, I have dynamic values.
This works fine no problem. Lately, I have enabled Export options.
Now, The exported pdf is not showing above mentioned changes. How do I do that ?
Second, I have enabled Legend. Is it possible to not to include Legend while exporting chart.

Related

Highstock yAxis missing reserveSpace option

I'm using Highstock to do some chart rendering.
I need to use the 'reserveSpace' option for yAxis labels (I need to set the option to true).
The problem is: reserveSpace option is present in the Highcharts API (see link https://api.highcharts.com/highcharts/yAxis.labels.reserveSpace), but is missing in the Highstock API (see link https://api.highcharts.com/highstock/yAxis.labels)
From Highchart site, the difference between Highcharts and Highstock is "Highstock is based on Highcharts, meaning it has all the core functionality of Highcharts, plus some additional features." (see https://www.highcharts.com/docs/chart-concepts/understanding-highstock)
So why the reserveSpace option is missing in Highstock?
Do you know if there is a way to integrate in Highstock the same reserveSpace behaviour already present in Highcharts?
Thank you

Series color in Jaspersoft 6.2 Highchart - Scatter

I've created a scatter highchart in Jaspersoft Server 6.2 (called ad hoc reports in the product) but encountered a strange problem where I cannot get normal color related properties to take effect. I normally just the property: colors ["#999999"] to other types of charts in Jaspersoft Server but for some reason this does not work in a scatter chart, I also tried using rgba values in the property.
I have searched extensively for a solution and everything that seems to apply to normal highcharts doesn't appear to work in Jaspersoft Server. I've tried adding the following properties:
series.color
series.data.color
series.marker.color
plotOptions.scatter.color
With hex and rgba values defined but the data points either remain black or disappear altogether. It's something that's very easy to manipulate in other chart types but scatter chart tye seems quite restrictive in Jaspersoft so perhaps not. Is there something simple I'm missing here?

Turn series and plot bands on/off using API

I have a chart that has a custom legend i.e. it isn't part of Highcharts at all, it's completely my own code, the Highcharts legend is disabled for this chart.
Is it possible to turn series data AND plot bands on/off in a Highcharts chart using the API?
I found an example that triggered the click event of a legend item to do this, but this obviously relies on a legend being present, so this is no use to me: http://birdchan.com/home/2013/01/23/trigger-a-click-event-on-a-legend-item-in-highchart/
I also tried to set the series data .visible property to false and then redraw the chart and although it sets the visible property just fine, it doesn't redraw the chart so nothing changes:
var chart = new Highcharts.Chart(myoptions);
$("#custom_legend_link").click(function (e) {
chart.series[0].visible = !chart.series[0].visible;
chart.redraw();
}
Here is a jsFiddle using the basic line demo showing my problem:
http://jsfiddle.net/gfyans/zsaV4/
Thanks,
Greg.
To toggle the series, use Series.setVisible(). When called without parameters, it toggles.
Plot bands are a bit different, since they don't have methods like hide(), show() or setVisible. To toggle a plot band, you need to remove it by Axis.removePlotBand() and add a new one with the same options by Axis.addPlotBand().

high charts with master-detail and handles

I'm using highcharts to build a chart and I need to use the api that it exposes to do certain things. however I would like my chart to be a master-detail type chart like the one in the highstock library but which has the handles on them.
I know i can create a master-detail in highcharts but it does not seem have the handles for dragging the selected range.
In the end I used highstock and found an example with multiple series in the 'master' chart which is called 'navigator' the highstock charts.
Example:
http://jsfiddle.net/davidoleary/NudSK/

Changing the contents of Highcharts legend

When using Highcharts, is it possible to change the contents of the legend to display something other than the series?
For example, I have a scatter chart with just one series but with many elements, so that the element labels obstruct one another and are illegible:
Would it be possible to use the legend to display the element names instead of the series? (each member in the series has a different color so that it is possible to use the legend in this case)
EDIT:
It turns out there isn't any good way to do this, so I wrote my own custom legend. You can find the code here: http://pastie.org/5115536
I hope you find it useful
Highcharts allows to show data points instead of series name in the in the legend. But, Unfortunately its only for Pie charts type:pie.
There is a default option available for the Pie Chart though undocumented in the API.
legendType: 'point',
If you try to set it for other type of chart, Legend does not gets rendered.

Resources