Change the chart's heading to align left

I would like this line chart heading to be left align. I used this code and nothing changes. Please help me with this. Thanks in advance!

<style>
.left-aligned-text {
    text-align: left;
  }
</style>

call the class with this code. 
<span class="left-aligned-text">Training expenditure</span>

Hi,
The new chart blocks have the option to have the title placed to the left (or to the right or centered).

If you still need to use an old chart block version, here is a code that should work:
To be added in the page settings => custom code => header
chart1 to be changed by the id of your block (the # just before chart1 must be kept)

<style>
#chart1 h2 {
  text-align: left !important;
}
</style>

To find the new chart blocks:

Thank you very much @matthieu_chateau. I added the code as you mentioned, unfortunately it is still not working. Could you please provide another solution?

I see that this is under a column container, which changes everything.
There’s no easy way to handle this, as finding the right selector would be cumbersome and there’s a 99% chance it won’t be stable—(meanining the selector could change monthly).
So please use the new charts instead; it’s the easiest way to solve the problem.

Old charts will be deprecated anyway.

1 Like

@matthieu_chateau Thank you for your suggestion. We will do that.