At the moment Dynatrace allows you to chart (Custom chart) HTTP 4xx and HTTP 5xx codes for a service or number of calls without errors as these are service metrics.
For specific HTTP codes, the information is available if you can display the information in service details by adding the specific code. Since this information is extracted from the service level data (it's not a metric), the availability depends on the data retention time you have for your service-level data. Typically 10 days (the default in Managed, not configurable in SaaS).
But with Dynatrace 184 (available later this month), you will be able to define custom service metrics that will calculate this information (and much more!).