SakeTami
bloodmallet
bloodmallet

patreon


Chart includes made easy

Did you ever wonder how complicated it is to include a chart from bloodmallet.com in your own website? I wondered the same and came to the conclusion, that I want to make it as easy as possible. Sticking right to the motto "data for everyone".

Disclaimer: This feature is at an experimental stage; somewhere between an alpha and beta. It'll surely stay, but the actual implementation might change alot in the future.


What's the fuss about? Just take a screenshot!

How about no? Screenshots are excellent to showcase the state of something from a specific date and time. But most of the time this important context is not provided and forgotten. Which leaves us with data that can easily be outdated. In addition: while taking a screenshot is quickly done, updating them and keeping track of potential updates in the future is quite time consuming.

Wouldn't it be much cooler, if the screenshot would update itself to the latest data?


The cool new thing

When thinking about how to tackle this problem a couple of goals were clear to me from the get-go:

Some more appeared during the first draft and when getting feedback from others. For example the first draft allowed only one chart per data type (trinkets, azerite item slot...), which wouldn't allow forums and pages who'd like to compare different specs at the same time, to use this feature.

The result is a small JavaScript file, that can be included in your website like any other JavaScript. Next you define a "<div>" with some specific attributes (which data you want to show) and everything else is done by the import.

Here is the necessary code for the screenshot above:

<div
 id="unique-id-1"
 class="bloodmallet_chart"
 data-wow-class="shaman"
 data-wow-spec="elemental"
>Loading...</div>


Limitation

For now I only support the current live Highcharts version and a v4.1 of it. Because Highcharts requires commercial websites to have a license, this isn't optimal. 

I'm looking forward to add free chart library support in the future. Therefore let me know what chart engines you use and would like to see added.


If you're curios about how to add such a chart in detail, you can read the wiki here:  https://github.com/Bloodmallet/bloodmallet.github.io/wiki/How-to-import-charts-or-data 


I hope you enjoyed this brief post. Let me know what you think and how to improve.


Yours sincerely,

Bloodmallet(EU)


More Creators