Explain Codes LogoExplain Codes Logo

Removing highcharts.com credits link

javascript
prompt-engineering
highcharts-api
credits-management
Alex KataevbyAlex Kataev·Oct 17, 2024
TLDR

Disable the Highcharts credits by inserting credits: { enabled: false } in your chart config:

Highcharts.chart('container', { // ...your chart particulars... credits: { enabled: false } // "Alohomora", the door to a clean chart opens! });

Ta-da! The Highcharts link is vanished, leaving an unblemished chart.

Customizing the credits

Highcharts API allows you to personalize chart credits to your fancy:

Highcharts.chart('container', { credits: { href: 'http://your-link.com', // Abra kadabra! a Custom URL! text: 'YourChartCreds', // Presto-change-o, custom text! position: { align: 'right', verticalAlign: 'bottom' }, // Voila, custom position! style: { color: '#50C878' } // And for the finale, custom style! } });

These customizations let your chart reflect your branding and style, mastering the visual message you want to emit.

When to disable credits

Credits are a powerful tool in your highchart ensemble. You might want to remove them when:

  • Design matters: you want a cleaner, uninterrupted chart visual.
  • Professionalism is paramount: The credits link can compromise the professional outlook of your chart.
  • Licensed user: By purchasing a Highcharts license, you are permitted to remove the credits link.

CSS way out

On a Bad Hair Day™, nothing may work as expected. Try CSS to hide highchart credits:

.highcharts-credits { display: none !important; // "Avada Kedavra", now you see it, now you don't! }

This invisible cloak hides the credits, sharpening up the overall quality of your web chart.

The risk of recluse

Whilst playing hide-and-seek with credits, be stay in the clear with Highcharts' licensing terms to avoid any unforeseen legal contretemps. Ensure you are licensed or eligible before waving goodbye to the credits.

Go beyond bait and switch

Are you in for some wizardry? Use API to turn the boring credits into dynamic elements like disclaimers or clickable links.

Highcharts.chart('container', { credits: { text: 'AbsolutelyNoChartsHarmed', // Text replaced.. href: 'http://www.your-link.com', // URL ready to teleport you... events: { click: function() { alert('Oh, you clicked me!'); // Event to surprise the clicker! } } } });

This quirky credit card tricks your user into exploring insightful extras.

Credits—completing the ensemble

Highcharts offers flexibility for aesthetic adjustments. Whether it be removing, disguising, or transforming credits, having these options up your sleeve adds enhances visual expression and helps the data tell its story.