This project is read-only.

Extend D3 for Top to bottom chart

Jun 11, 2010 at 3:02 PM


I'd like to extend D3, like DynamicDataDisplay.Maps or DynamicDataDisplay.Coastline (meaning I don't want to directly modify DynamicDataDisplay.dll), to have a chart that goes from top to bottom. The X axis would be on the left and the Y axis on the top.

What class do I have to extend (LineGraph ? ChartPlotter ?) ?
How can I achieve that ?

Thank you.

Jun 11, 2010 at 4:15 PM


To create a vertical line chart you need almost nothing to change. The only thing may be a FrequencyFilter (see Plotter2DExtensions file in D3's assembly - there are places where it is added to LineChart's Filters collection). The FrecuencyFilter is designed to work with horizontally aligned points.

You can:

not use AddLineChart extension methods and add LineChart with all necessary properties set manually. And here you can either don't use points filtering at all or create your filter that will filter vertical-aligned points.

Best regards,


Jun 11, 2010 at 4:42 PM

I did not find the necessary properties in LineGraph. The only thing I see is doing a RotateTransform, is that what you meant ? Could you tell me what are the properties I should use ?

Thank you.

Jun 11, 2010 at 5:51 PM

I was speaking about Filters collection of LineGraph.

Jun 11, 2010 at 6:27 PM

I thought Filters was only to filter what values to display ?

What I'd like to do is something like this: where the X axis is on the LEFT, the Y axis on the TOP.

Jun 12, 2010 at 1:41 AM

If you need move Y axis on the top, than call ((Here you might have to change type to NumericAxis, I don't remember clearly)plotter.MainVerticalAxis).Placement = AxisPlacement.Top;

If you want to have chart going from bottom to top, then clear LineChart's Filters collection (to remove any influence on chart) and try to paint it using your "bottom-to-top" data.

Also you can use Plotter.Viewport.DataTransform (assign a new transform to it, if you have data going from left to right, and you want it to go from bottom to top.

Best regards,


Jun 12, 2010 at 11:46 AM

Ok. Thank you very much.