I have taken a simple dataset which contains positive and negative value.This graph plots the positive values from dataset towards right side and negative values towards left side.All the positive values are represented in blue color and negative values are given red colors.
Channel used: Magnitude channel.(magnitude as position)
Marks : Bars.
The discriminability is maintained here as the common scale is used for representing the both type of values and magnitude of bar changes with change in position along the axis
https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js