How to remove highcharts.com credits link

Highcharts is a popular JavaScript charting library that offers a wide range of interactive and customizable charts for developers. However, if you’re using the free version of Highcharts, you may have noticed a “Highcharts.com” credit link at the bottom of your charts. While this is a small price to pay for using a powerful tool like Highcharts for free, it may not be desirable for some applications.

Fortunately, removing the Highcharts credit link is a relatively simple process that can be accomplished with just a few lines of code. Here’s how to do it:

Step 1: Check your license

Before you start removing the credit link, it’s important to make sure you’re not violating the Highcharts license agreement. If you’re using the free version of Highcharts, you must keep the credit link intact. If you want to remove it, you’ll need to purchase a commercial license. You can check your license by looking at the Highcharts.js file you’re using. If the license key is missing or set to “undefined”, it means you’re using the free version.

Step 2: Remove the credit link

If you have a commercial license or you’re using the free version of Highcharts for non-commercial purposes, you can remove the credit link by adding a single line of code to your JavaScript file:

Highcharts.setOptions({
    credits: {
        enabled: false
    }
});

This code disables the Highcharts credit link for all charts on the page. Simply include it in your JavaScript file after you’ve loaded the Highcharts library, and the credit link will disappear.

If you only want to remove the credit link for a specific chart, you can add the “credits” option to your chart configuration and set “enabled” to false:

var chart = Highcharts.chart('container', {
    credits: {
        enabled: false
    },
    // chart configuration options
});

This will remove the credit link for just that specific chart.

Step 3: Customize the credit text

If you’re using a commercial license, you can customize the text of the credit link to display your own branding or messaging. To do this, simply add the “text” option to your “credits” configuration:

Highcharts.setOptions({
    credits: {
        text: 'My Custom Text',
        href: 'http://www.mycustomurl.com'
    }
});

This code sets the credit link text to “My Custom Text” and sets the link destination to "http://www.mycustomurl.com". You can customize the text and URL to suit your needs.

Conclusion

Removing the Highcharts credit link is a simple process that can be accomplished with just a few lines of code. However, it’s important to make sure you’re not violating the license agreement before doing so. If you’re using the free version of Highcharts, you must keep the credit link intact. If you have a commercial license or you’re using the free version for non-commercial purposes, you can remove the credit link or customize it to display your own branding. With these steps, you can ensure that your charts look professional and reflect your own brand.

Photo from Unsplash

Related Posts

Highcharts Place text in the center of a pie chart

Highcharts Place text in the center of a pie chart

To place text in the center of a pie chart in Highcharts, you can use the chart.renderer object to create a custom label and position it in…

Test design breakpoints using jest and react-testing-library

Test responsive design using jest and react-testing-library

Testing design breakpoints in React applications is an important aspect of front-end development. It ensures that the components look and behave as expected on different screen sizes….

Testing React-Query with Jest and React-testing-library

Testing React-Query with Jest and React-testing-library

Introduction In this article we will cover the basic usage of testing useQuery hook from tanstack/react-query library, along with how to test it using jest and react-testing-library….

Highcharts How To Change Series Color with examples

Highcharts How To Change Series Color with examples

To change the color of a series in Highcharts, there are a set of options we are going to discover in this article. Option 1: Using the…

A quick introduction to Javascript shadow DOM

A quick introduction to Javascript shadow DOM

Introduction JavaScript Shadow DOM is a powerful tool for creating isolated and reusable components in web development. It allows developers to create custom elements with their own…

Mock useSearchParams react testing library

Mock useSearchParams react testing library

To mock the useSearchParams hook from react-router-dom, you can use Jest’s mock function to provide a mocked implementation for the hook. For example: Consider we’ve a URL…

Leave a Reply

%d bloggers like this: