IntensityChart

Jul 13, 2009 at 9:59 PM

Hi D3 friends

I find the project Dynamic Data Display is a very interesting one. Since I am new in WPF, I would like to ask you if we can use D3 to develop a intensity chart. In an intensity chart the value pair (X,Y) is represented as a pixel (or a small rectangle) with the value Y converted to a color at the position X.

I have uploaded a pdf file illustrating the intensity chart at http://cid-7d30e9f415751779.skydrive.live.com/self.aspx/DynamicDataDisplay/IntensityGraph.pdf

Regards

HDN

 

 

Editor
Jul 14, 2009 at 5:47 PM

Hi,

Seems like the right side of that picture is a projection of 3D surface build on some grid. Currently DynamicDataDisplay doesnot support three-dimensions graphics, and time when this support will come is indefinite.

You can try to write your own control for displying such a surface on a WPF - there are rather many tutorials about how to do it.

The left part, where (as I understood) section of 2d surface is drawn, is easier to do - you should only implement a logic which will build 1D data series by interpolating x and y values of surface.

 

I wish you luck in doing this, if you need some help on how to do it using D3 - you are welcome)

 

Best regards,

Mikhail.

Jul 14, 2009 at 9:16 PM

Hi

It seems that the document IntensityGraph.pdf, that I made, has caused some misunderstandings.

Assume that we have the array with n pairs: (x1,y1), (x2,y2), (x3,y3), (x4,y4), (x5,y5),..., (xn,yn)

What CharPlotter does is it makes DrawLine() gets called to draw line from (x1,y1) to (x2,y2) and then from (x2,y2) to (x3,y3), ...

What I want to do is to extend CharPlotter so that

for (x1,y1): a small rectangle at (x1,1*PixelHeight,PixelWidth, PixelHeight) gets filled with the color calculated from y1

for (x2,y2): a small rectangle at (x2,2*PixelHeight,PixelWidth, PixelHeight) gets filled with the color calculated from y2

for (x3,y3): a small rectangle at (x3,3*PixelHeight,PixelWidth, PixelHeight) gets filled with the color calculated from y3

With

PixelWidth = LenghtOfAxisX/n

PixelHeight = LenghtOfAxisY/n

and x1,..,xn must be <= LenghtOfAxisX

I think it is 2d drawing but using color to interpret the value of y along the x axis.

Long long time ago under MFC I can call SetPixel()  to get the job done but under WPF, I have a lot to study :-)

I am studying DrawingVisual with DrawRectangle() and try to integrate them into D3 but am only a novice !

Could you help me to answer some questions:

1. Where does CharPlotter call DrawLine() to draw the line ? in which class ?

HDN

 

 

 

 

Editor
Jul 16, 2009 at 4:50 AM
Edited Jul 16, 2009 at 5:04 AM

Hi,

There is what I've created for you - http://cid-eaf0a921258b5980.skydrive.live.com/self.aspx/.Public/D3/IntensitySample.zip

Try to drag the small black circle in the middle of color surface.

I hope this is a good start application for building you own one)

 

Best regards,

Mikhail.

Jul 16, 2009 at 8:28 PM

Thank so much TheCentury.

It is that what I want to do with D3.  I will study the code that you give me and tell you about my success with D3.

I have another question: how to get the latest code of the library D3. There is a lot of changes of the version that you just give me and the released version v0.3. Some samples from version v0.3 can not be compiled with the version that you give me. e.g. "DynamicDataDisplay.Maps", "DynamicDataDisplay.Coastline", "MercatorShaderMapSampleApp".

Regards

 

HDNguyen

 

Editor
Jul 21, 2009 at 3:40 PM

Hi,

I'll try to upload our current development version into Sources here at codeplex. When it's done, I' notify you.

Mikhail.

Editor
Jul 22, 2009 at 8:02 AM

Hi,

As I have promised, I've uploaded the latest development source code to http://dynamicdatadisplay.codeplex.com/SourceControl/ListDownloadableCommits.aspx - it is in the latest change set, in 'Nightly' folder.

I'm going to continue uploading such development versions in the future, too.

 

Best regards,

Mikhail.