I have completely the same problem. Looks like Apex 5.1 seriaes charts are not working correctly.
I have installed "Sample Charts" application in the Oracle Apex workspace.
It have Bar Chart example appication. The Series Name Column Mapping example working ablosutely fine:
But if I remove a order by in the SQL Query:
It starts to generate different results:
What the hell?
My real use case doesn't work even with order by clause. It simply puts values to another buckets
Below is the reply from Oracle in another thread:
In relation to the rendering of the data - JET requires that each series of the chart contain the same number of data points, otherwise it will just render them in the order in which they appear in the JSON object - which may not be the expected result. The handling of nulls needs to be done by the query, but we may revise this behaviour in a future release.
You can refer to