Skip to main content

Microsoft Silverlight

Answered Question Contour Chart starting pointRSS Feed

(0)

starman2049
starman2049

Member

Member

3 points

6 Posts

Contour Chart starting point

I am using the toolkit charting libs and would like to do a contour chart (think a continuous X,Y chart where the datapoint color represents a third value, say height at x,y)

I am thinking about using a scatterseries, but wonder how hard it will be to make sure that the scatterdatapoints are always visually connected to each other in a grid.

 Any other ideas on how to do this?

I also thought about using a bar chart and doing a custom bar style...

starman2049
starman2049

Member

Member

3 points

6 Posts

Re: Contour Chart starting point

Update:

I did a quick test with using a scatterseries to achieve a contour chart and had two problems:

 1) it looks like the data points for a scatterseries all have to be the same style for a given scatterseries which is not goint to help since I need them to be a custom color based on scatterseries x,y cooridnate

2) the performance is woeful. I did a 43 x 128 contour chart which is only about 10% of the size I would want to be able to do and the scatterseries took 16 seconds to load.

So now I am still left wondering what the best way to do a contour chart in Silverlight.  I am going to try two different directions:

1) doing a bubble series - since it appears to support different datapoints - at least in size

2) creating a bitmap in realtime form my daya and using that as the background for a chart - basically a bitmap with two axis

Any ideas/thoughts are appreciated!!

Mog Liang - MSFT
Mog Lian...

All-Star

All-Star

15854 points

1,541 Posts

Re: Contour Chart starting point

Hi,

If you want to present some 3-d data, then Bubble series could be useful, and needn't much code work.

Creating bitmap gives more flexibility, however, you need create chart from the very beginning, writing much code.

I would suggest using bubble chart

Thanks,

Mog Liang
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.

starman2049
starman2049

Member

Member

3 points

6 Posts

Re: Contour Chart starting point

I tried Bubbleseries and scatterSeries and they both slow down dramatically when the number of points > 1000-2000.  For example I created a scatterseries with 128 columns and 43 rows of data and it takes 26 seconds to create the chart.

 I need something that supports at least 10,000 columns x 50 rows.  I have had good success using a WritableBitmap and creating the controur chart this way now I have to make axis, labels, tooltips, etc.

Is there any way to just use the toolkit charting library to do the axis and other chart piece and use a WritableBitmap to display in the chart area?

dr d b karron
dr d b k...

Member

Member

60 points

113 Posts

Re: Re: Contour Chart starting point

I'm very keen on contouring;

let me know how your project progresses.

 

You may want to look at a non silverlight contouring/segmentation package produced by Kitware based on ITK.

 

Ultimately, when you start getting into large amounts of data you may

want to switch to another backend, pehaps inserted into a video window.

How much interactivity do you want ?

 

good luck,

 

dr. K

dr d b karron
karron@casi.net
http://www.casi.net/
-----
I will mark your response as an answer after i test it. I have not forgotten your post !
------

Mog Liang - MSFT
Mog Lian...

All-Star

All-Star

15854 points

1,541 Posts

Answered Question

Re: Contour Chart starting point

Hi,

You could use toolkit chart axis, and apply your bitmap as chart PoltArea's background. check this sample:

 

  <Grid x:Name="LayoutRoot">
        <charting:Chart>
            <charting:Chart.PlotAreaStyle>
                <Style TargetType="Grid">
                    <Setter Property="Background">
                        <Setter.Value>
                            <ImageBrush ImageSource="http://www.microsoft.com/presspass/events/mix/images/SilverlightLogo1_web.jpg"/>
                        </Setter.Value>
                    </Setter>
                </Style>
            </charting:Chart.PlotAreaStyle>
            <charting:Chart.Axes>
                <charting:DateTimeAxis Minimum="2009/1/1" Maximum="2009/10/1" Orientation="X" HorizontalAlignment="Stretch" IntervalType="Months" Interval="1" ShowGridLines="True"/>
                <charting:LinearAxis Minimum="0" Maximum="10" Interval="1" Orientation="Y" ShowGridLines="True"/>
            </charting:Chart.Axes>
        </charting:Chart>
    </Grid>
  

thanks,

 

Mog Liang
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.

starman2049
starman2049

Member

Member

3 points

6 Posts

Re: Contour Chart starting point

Have had good sucess at using WritableBitmap to do contour section of chart and use the toolkit charting for axis and other bits.

Here is a image of pass 1...

Pass 1

dr d b karron
dr d b k...

Member

Member

60 points

113 Posts

Re: Re: Contour Chart starting point

what is that ?

 

dr d b karron
karron@casi.net
http://www.casi.net/
-----
I will mark your response as an answer after i test it. I have not forgotten your post !
------

starman2049
starman2049

Member

Member

3 points

6 Posts

Re: Re: Contour Chart starting point

This is water velocity in different depth cells across a number of days off the coast of California near San Diego.  the sine wave is the surface.  there are 4800+ profiles, each 10 minutes apart.

dr d b karron
dr d b k...

Member

Member

60 points

113 Posts

Re: Re: Re: Contour Chart starting point

ah, very cool.

i like the technique of using a bitmap when the data gets dense.

but how is it is contour plot ? 

 

dr d b karron
karron@casi.net
http://www.casi.net/
-----
I will mark your response as an answer after i test it. I have not forgotten your post !
------
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities