Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Before we can move on to the coding part, we will also need to find the ID of the chart. We need this in order to change the color of the bar via Javascript. You can do so by inspecting the chart during run time. 

Figure 5: Chart ID

...

Implementation

Now that we have a clear understanding of our configuration, let's proceed to write the JavaScript code that will dynamically alter the color of the bar in accordance with the target. You can set this code in eChart Menu > Advanced > Custom Header.

...