I have to implement a plotting solution to plot 2D fracture simulations, similar to the image shown via the link below.
I have a TecPlot formatted data file, which contains (among other data) x and y points and multiple values for that point, i.e, temperature, pressure, etc
I need to "plot" the x/y points and generate a 2D mesh (triangles), and a contour/heatmap based on the x/y point, and one of the properties, such as temperature, pressure.
The mesh and color contour should be visible together.
Does XamDataChart support this?
https://skydrive.live.com/#cid=474829871261F415&id=474829871261F415%21106
Hello Joseph,
I'm sorry for a late response. It depends on how complicated is your data structure and what are you chart requirements in terms of performance? Also, are you going to update your data point frequently? Please attach your sample with a model representing your data and I will investigate your issue. Also, please let me know what are your other chart requirements so that I can provide you with the best possible solution.
hello, The idea looks good to me. But I have large number of points over 70K. Is there way I can bind the data without TriangulationSource?
I tried binding my own properties but something is not right. Any help will be very much appreciated.
Martin,
I updated your sample project to include my data. I added a plot file in the bin/debug directory, and added functions in TriangulationData to read this file and parse into objects, then I add ScatterDataItems as you did.
Also, I added three classes to facilitate the parsing of the file in the existing Models Folder.
Howver, when I run the app, I get MANY triangles. The link below shows the result. The second link shows what the plot should resemble. The third link is to the modified sample app, in rar format.
https://skydrive.live.com/#cid=474829871261F415&id=474829871261F415%21133
https://skydrive.live.com/#cid=474829871261F415&id=474829871261F415%21130
https://skydrive.live.com/?cid=474829871261f415#cid=474829871261F415&id=474829871261F415%21106
The plot file contains multiple ZONES. My code parses the entire file and creates a Zone object for each ZONE section of the file, and adds it to a Zones collection. Each zone contains a collection of ZoneElements and ZonePoints.
The ZoneElement defines an element (polygon) via it's 4 points. If point 4 = point 3, then it's a triangle. If point4 and point 3 are different, it's a rectangle. I iterate thru the collection of ZoneElements, and for each of the 4 indexes in the element, I obtain the associated ZonePoint. So for instance, you'll see 1 54 55 2 in a zoneElement, that means to read the first item in ZonePoints collection to get X/Y/Value, then read item 54, then item 55, then item 2. I then provide these x/y points to the points of the ScatterDataItem.
NOTE: I am plotting the last ZONE from the file.
Can you please advise me as to where all the extra triangles are coming from. BTW, this works perfectly in OxyPlot, but I'm not experienced in the XamDataChart, yet, to find the problem.
Thanks,
Michael
Thanks for the reply and sample app.
I am running 13.1 of the WPF controls. Your sample was 12.2. Is 13.1 the service release you mentioned, and 13.1 supposed to allow the display of ScatterAreaSeries? I upgraded your sample to 13.1 and the HeatMap Area check box has no effect.
Shoud it more closely resemble the sample images I provided links to?
Hello Michael
I have look into your request for rendering heat map in XamDataChart and at this moment XamDataChart does not support this feature.
You can request this feature in XamDataChart control on this website: http://ideas.infragistics.com and I strongly recommend you to do so because members of the Infragistics Community can vote for the features and suggestions they want to see added to the products, resulting in the most popular features bubbling up to the top. When planning new releases, our Product Management team will look at the most popular features and use your feedback to prioritize upcoming work.
That being said, there is a workaround for rendering heat maps in the XamDataChart control. Namely, you could use ScatterAreaSeries and ScatterContourSeries (provided by XamGeographicMap control) in XamDataChart to accomplish your request. However, usage of these series was not tested in XamDataChart and they might be some issues with this method of rendering heat map.
While developing a sample application to demonstrate usage of ScatterAreaSeries and ScatterContourSeries in XamDataChart, I found an issue that prevents rendering ScatterAreaSeries and I logged this behavior in our internal tracking system with a Development ID of 146581. This issue has already be resolved and is pending release. Therefore, you will be able to render heat map in the XamDataChart control in upcoming Service Release. Because of this issue, you can render colored contours and points of heat mesh.
I attacked a sample application that shows how to render heat map as well as heat mesh in the XamDataChart control. When you run this application, the XamDataChart control will render four heat map data using four series:
- ScatterAreaSeries – for rendering area of heat map*
- ScatterContourSeries – for rendering contours of heat map
- ScatterLineSeries – for rendering lines of heat mesh
- ScatterSeries – for rendering points of heat mesh.
*Note that XamDataChart will display ScatterAreaSeries only when the application is built against the next service release.
Also, I added controls to toggle visibility of all series in the chart so you can quickly review them individually and decide which series you want to use in your application.
In my application, I used TriangulationSource which converts scatter data items (with x/y point + value) to triangulated data structure consisting of triangles which are later used by ScatterAreaSeries and ScatterContourSeries. This process is fast for small data sets of scattered data but with tens of thousands of points this might take some time. TriangulationSource provides methods to save and later load triangulated data and thus improve the speed at which heat map data is loaded and rendered in XamDataChart control. Please refer to this help website for more information about this feature.
I have created a private case (CAS-119906-N2W0G4) for you to track the issue #146581. You will be automatically notified when this issue is resolved in the next service release.
-Martin