Open allenwyma opened 10 years ago
Do you have an example of this? Assuming you're talking about the digested version of the assets (ie. /assets/amcharts/loading-2f99a7ca7730e98eb35460cce0ae3cec.gif
vs `/assets/amcharts/loading.gif'), it is working as far as I can see.
Yes, they upload AND are stamped, but the problem is that the javascript is trying to load in loading.git and NOT /assets/amcharts/loading-2f99a7ca7730e98eb35460cce0ae3cec.gif so the pictures don't come in.
Which image are you having trouble with? Something built into AmCharts (like the zoom icon or scrollbar toggles)? Or something you're adding yourself?
Yes. the ones built in to the chart, of course. It seems the JavaScript is still trying to look for the image WITHOUT the fingerprint, which of course it cannot find.
Yeah the reason for this is that the AmCharts js is setting up which files to use, and doesn't know about Rails or the asset pipeline :smile:
AmCharts.rb should probably override these images with asset paths, but doesn't right now. In the meantime, you can override the properties yourself (ie. zoomOutButtonImage for a serial chart). Feel free to contribute a pull request if you want to tackle having AmCharts.rb take care of this.
(Note: some of the icons seem to be hardcoded into the amcharts JS for whatever reason, for instance dragIcon.gif
for scrollbar handles)
Hi, I was looking for a solution for zoomOutButtonImage issue. Can you explain more in detail on how to override its property, please? @dvandersluis
@maxpark-jd Something like this should work:
chart = AmCharts::Chart::Serial.new(data) do |c|
c.zoom_out_button_image = '#{asset_url(...)}'
end
thanks a lot @dvandersluis !
Can I exclude only amchart.rb images from config.assets.precompile
?
Images are processed with a fingerprint, but somehow they are being linked against the unfingerprinted version.