dynamic data display chart plotter in MVVM - dynamic-data-display

I am trying to use d3 chart plotter in MVVM.
I am trying to use the code given by Ravi ( https://dynamicdatadisplay.codeplex.com/discussions/63633 ) in my project, but not quite sure how to use it properly.
It says "the property Linegraphs is not found in type ChartPlotter" when I try to use it in the XAML code.
What I did is add the LinegraphViewModel.cs to my project and make it the same namespace as my new project.
Anyone can advice me on what should I do in order to use the plotter successfully in my MVVM application?
Thank you so much!

Dynamic Data Display is a complex library with many different components. It not enough to pull a single class into your project. You need to reference the d3 .dll to your project to be able to use it's functionality, as well as using the dynamic data namespace in your xaml.
After adding a reference to the library to your project, you can set up the Dynamic Data Display namespace like this :
xmlns:dynamicDataDisplay="http://research.microsoft.com/DynamicDataDisplay/1.0"

Related

Does the Highcharts-Vue wrapper support 'gauge' and 'heatmap' chart types?

https://github.com/highcharts/highcharts-vue
I don't see examples of these in the demo and there is nothing mentioned in the docs. I'm wondering if it is simply not possible or just not demoed because of their more complicated nature.
I will also need to use Charts appendData prototype to make a line chart real-time. Is this possible using the wrapper? I'm thrown by the following in the docs but not sure it it's directly related;
You can access the Chart object instance if necessary (e.g when need
to get some data or use any of Chart.prototype functions), by calling
specific Vue component instance chart field, but it is not supported
to update the chart using its built-in functions
Indeed, the highcharts-vue package supports all official modules included in Highcharts, so it's not necessary to produce every demo from demos site using Vue wrapper. I made the examples with gauge and heatmapseries specially for you, so please take a look on them.
I will also need to use Charts appendData prototype to make a line chart real-time. Is this possible using the wrapper?
A component is watching for changes on provided chart configuration, so if you will update your data (e.g by pushing new points into a series.data), then highcharts-vue will detect it, and automatically update the chart. That's the most recommended way of implementation. If you would like to use some Chart's or Series prototype functions, of course you can do that, but please note that causes inconsistency between the chart data and the data defined within component. Just need to access chart's reference like it is described in Chart object reference section.
Live examples:
https://codesandbox.io/s/vue-template-uqu1p (Gauge),
https://codesandbox.io/s/vue-template-8z2f5 (Heatmap)

Why cant access name space Windows::Phone::UI::Input

Using Blank winrt template project
Does not recognize winrt/Windows.Phone.UI.Input.h
meaning no namespace Windows.Phone.UI.Input.
trying to use class HardwareButtons
Any help much appreciated

How do I provide a custom data as a DataProvider for ImageTilesLayer on a mapControl in XAML file?

How do I provide a custom data as a DataProvider for ImageTilesLayer on a mapControl in XAML file?
I am new to WPF and DevExpress. I was trying a few examples given in the DevExpress documentation site.
Link: How to Load Image Tiles from Another Source
In the example, How to Load Image Tiles from Another Source given in their site, the DataProvider for a ImageTilesLayer is assigned in the code behind file.
Is it possible to mention the same DataProvider in the XAML instead of the code behind file?
You can assign the ImageTilesLayer.DataProvider property in XAML as follows:
<dxc:MapControl>
<dxc:ImageTilesLayer>
<dxc:ImageTilesLayer.DataProvider>
<local:CustomMapDataProvider/>
</dxc:ImageTilesLayer.DataProvider>
</dxc:ImageTilesLayer>
</dxc:MapControl>
P.S.
For more information about XAML properties syntax, see XAML Overview (WPF)-> Property Element Syntax MSDN article.
For more information about custom types in XAML, see XAML and Custom Classes for WPF.
Coding Horror, I would suggest you first read the tutorials given by DevExpress.
Link to the tutorials is below.
https://documentation.devexpress.com/#WPF/CustomDocument10682
It explains the different layers on map control.
Once you have read that, read on how to load images from different source
https://documentation.devexpress.com/#wpf/CustomDocument11174
In the code, instead of giving a url, change it to a local image folder where you have cached all the map tiles.
public class CustomTileSource : MapTileSourceBase {
const string roadUrlTemplate =
#"http://{subdomain}.tile.openstreetmap.org/{tileLevel}/{tileX}/{tileY}.png";
You can know more about caching at https://documentation.devexpress.com/#WPF/CustomDocument12205

TypeScript Intellisense works differently if I define Object in Different Ways

I am trying to convert some existing JavaScript code by using TypeScript, One example I am using is to create Highcharts classes, the Highcharts definition is from https://github.com/borisyankov/DefinitelyTyped/blob/master/highcharts/highcharts.d.ts
We all know HighchartsOptions has a property title.
If I define the object in this way, I have intellisense
But if I define object this way
I don't have the intellisense.
Any specific reason why Visual Studio behaves differently?
It's just a bug. See this issue on CodePlex to track when it gets fixed.

WinRT XAML apps + missing [XmlnsDefinition] attribute

There is not [XmlnsDefinition] attribute in XAML metro style applications, based on WinRT.
How my custom namespace mappings from WPF/SL apps should be migrated to WinRT XAML apps?
Looks like XmlnsDefinitionAttribute is missing. There is XmlnsDefinition struct but that is of not much use since there is no way to use it to set custom namespace mappings.
A discussion at https://social.msdn.microsoft.com/Forums/windowsapps/en-US/026baea0-6324-46ee-956a-72dbb4c90ca1/xmlnsdefinition-replacement-in-winrt?prof=required says:
there is no analogous attribute.
You might be able to provide similar data in a custom
IXamlMetadataProvider implementation, but since that is automatically
generated for you I'm not sure it can be overridden.