Reputation: 269
How can I remove the branding text from an amChart chart?
JS chart by amCharts
Is there a way to remove that text in the chart configuration?
Image of such a chart:
Upvotes: 14
Views: 52722
Reputation: 534
For amCharts5 just call dispose()
on _logo
, which is an attribute of the Root
class. For example:
const root = am5.Root.new('chartdiv');
root._logo.dispose();
Of course, you probably shouldn't do so if the license does not allow it and you don't plan to acquire the license. Otherwise, it's convenient to hide it for the time being as it sometimes overlaps with other elements and accidental click on the logo opens up a new browser tab, which is annoying.
Upvotes: 12
Reputation: 1988
For amCharts Version 4:
chart.logo.disabled = true;
For amCharts Version 5:
let chart = am5.Root.new('chartdiv');
chart._logo.dispose();
Upvotes: 2
Reputation: 653
I am not sure whether i am allowed to answer this question but due to lack of information and stack overflow being a free resource for everyone
Here is what can be used to remove that
[title="JavaScript charts"] {
display: none !important;
}
I highly encourage everyone to buy the license tho
Upvotes: 0
Reputation: 7826
amCharts Version 4 license: (https://github.com/amcharts/amcharts4/blob/master/dist/script/LICENSE)
The relevant part about logo/attribution:
You do not disable, hide or alter the branding link which is displayed on all the content generated by amCharts software unless you provide some other adequately prominent attribution to amCharts.
In the second paragraph it repeats this by saying what you can not do:
Use amCharts software without any kind of prominent attribution (bundled or custom)
You have the permission to remove the logo/attribution but to do that without breaking the free license you need to place something comparable.
With a bit common sense applied everyone knows what to do and what not.
I would assume that a link below your chart "Powered by amCharts" to the amcharts.com website would be sufficient to satisfy the license. Or the logo with a link.
Solutions:
One thing you can always do is remove it by a CSS query by jquery:
$('g:has(> g[stroke="#3cabff"])').hide();
But using their official method is recommended:
When using Version 3
AmCharts.makeChart("chartdiv", {
"hideCredits":true,
When using Version 4:
am4core.addLicense("ch-custom-attribution");
Just make sure you include a proper replacement.
License requirement: ...unless you provide some other adequately prominent attribution to amCharts.
Also if you use another version of amCharts than '4' you need to read the license conditions.
I only made sure the current 4 version allows it, though it's probably the same with V3 given the official support in the API.
Keep in mind that it is quite simple for a company to search for websites who use their chart without the attribution.
Adding a small logo/link is a common thing.
Take a look at "Tradingview" charts, even Multi Billion USD companies (Binance for example) have no problem giving them attribution for their chart.
I found this question because I am combining two charts, overlaying each other forming one chart. So the attribution needs to be changed. Given the "takedown" answers on stackoverflow on all these questions I had to do it myself
Upvotes: 11
Reputation: 16012
amCharts employee here. The branding text/logo is on the free version of the library. As stated on the license terms:
Free license
Use anywhere you want as long as you don't mind a small amCharts attribution on charts
If you want to remove the text, you have to purchase a license. See the license FAQ for information on what license is appropriate for your use case. You can reach out to AmCharts support for further clarification on the license terms.
If you already have a license and are using amCharts v3, just download the files from the support site, upload them to your web server and use those instead of the files on the amCharts CDN. If you're using npm or just wish to use the CDN files with your license, contact amCharts for instructions on how to apply your license. Do note that support for amCharts v3 will end at the end of 2020, so you may want to consider migrating to v4 for any further support and fixes.
If you have a license and you are using amCharts v4, the instructions are available in your support account. You will need to create a support account if you don't already have one and attach your license (order ID and email used to purchase the license) to your account to view the instructions.
Finally, if you're still having trouble with applying your license, contact amCharts and provide your order details.
We don't provide instructions on how to hide credits on a public forum for obvious reasons.
Upvotes: 39