michelson / lazy_high_charts

Make highcharts a la ruby , works in rails 5.X / 4.X / 3.X, and other ruby web frameworks

Home Page:http://www.suipit.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for 'noData' settings in highchart?

abuisman opened this issue · comments

Hi,

We have a chart of which the series is an empty array. Highcharts supports this through an external file (no idea why) and some settings:

    @chart = LazyHighCharts::HighChart.new('graph') do |f|
      f.options[:lang] = { noData: I18n.t('helpers.chart.no_data') }
      f.title(text: nil)
      f.series([])
    end

Quote:

Options for displaying a message like "No data to display". This feature requires the file no-data-to-display.js to be loaded in the page. The actual text to display is set in the lang.noData option.

As described here: http://api.highcharts.com/highcharts/noData
And demonstrated here: http://jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/highcharts/no-data-to-display/no-data-line/

We looked through the source of the gem, but we couldn't find anything that looked like it was the no-data-to-display.js file. Maybe we overlooked something?

The feature works when we manually include the file from the high charts jsfiddle.

This issue seems to be resolved by this pr that is now merged: #222