I think something like this will get you pretty close to what you want.
It's a bit more of a natural step to use the date in the X-Axis, because Y axis is usually for metric aggregations like sum or count, and the Y-axis is usually for bucket aggregations like date histogram.
I made a bunch of test data using
('A', 5, 2017-08-01) as an example. I call the first field "code", the second field "scans" and the third field "date". Then I created a test index with a bunch of documents like:
Using Kibana 6.2.2, I create a line chart visualization to show a sum metric of all the scans bucketed by date:
The line can be divided by the "code" field using a terms aggregation:
Finally we can put in a filter by clicking "Add a filter" and walking the dialog through to:
code.keyword is one of
So, if I want to change the code filter to add C or have it just show A, then I can click the pencil icon to edit the filter and adjust it.
The icons on the filter "pill" also allow me to toggle the filter off, invert it, or pin it so it sticks and gets carried over to other visualizations and dashboards