charts as data points(markers) in arcgis javascript API - geospatial

I have a requirement where the marker points(graphics) on the esri map should be a dynamic pie chart with a data set of its own.
Is this possible using ArcGIS javascript API?

It kind of depends, how you want to use it. If you just want to visualize the points as Charts, the most simplest way is to create the symbology in ArcMap and host its as a map service. According to the supported functionality for ArcGIS Server. Charts are also supported.
If you cannot create a service, and would want to create charts runtime in Javascript. Then the only option would be to create the charts as images and add the Point on map with PictureMarkerSymbol.

Related

Is there a way to visualize Chart by its spec obtained from Sheets API using Node.js?

I use Google Sheets API from googleapis to get a spreadsheet and its charts. So I have ChartSpec. How can be this spec used to visualize the chart in a web application, e.g. using Visualization API?
Use case
A simple web app written in HTML and JS which shows all charts from an arbitrary spreadsheet. In the ideal scenario, the charts are rendered just like in spreadsheets, so I can see the charts without the necessity to open a spreadsheet manually.
A user selects a spreadsheet from a list of predefined spreadsheets (menu)
Web app requests up-to-date data for the selected spreadsheet from Node.js backend
Node.js app gets all charts in the spreadsheet using Google Sheets API
Node.js app responds with necessary data
Web app visualizes the charts that should ideally be interactive (eg. using Visualization API)
Problem
I have a trouble with steps 4 and 5. In step 3 I receive ChartSpec which seems to contain all information but data. Instead of data, there are just references to ranges in a form of ChartData object.
Creating a custom implementation which gets all referenced data seems extremely complicated. Even if I created it on my own, I do not know how to create visualizations in step 5.
What I found and why it is not solution for me? There are similar questions and solutions that use Visualization API to query data from a spreadsheet and the visualize it, such as this answer. Why is this not solution for me? Because my spreadsheets are created by non-tech people who do not follow any good practices, so data cannot be easily queried using Query API. The spreadsheets are a mess. The charts are created by the same folks and they want to customize it by themselves. What I need is to show already existing charts without necessity to make any chart-wise code.
The only solution I came up with so far is to use the Chart Editor and allow the user to set up the chart himself. I would be interested in investing in such a solution or working on it together.

Changing colors on Azure Dashboard Charts and Global parameter for all tiles

We have created Azure Dashboard with custom KQL queries with 5 tiles and we want to send a OPERATION ID from one page to this Dashboard page and we want all tiles to consume this PARAMETER in the query.
Is it possible to send a global query parameter and get it used by all the tiles on the Dashboard? Also is it possible to control the COLORS on the Charts rendered in these tiles on the dashboard? Can we change the colours of this pie chart rendered or that is not possible?
Any help
Thank you
Unfortunately this is not supported out of the box with Azure Dashboards and don't anticipate it being either, there is a feature request but doesn't have many votes and no traction.
https://feedback.azure.com/forums/223579-azure-portal/suggestions/11722425-tile-background-color
The best option if you wanted rich charting like this is to go towards Power BI
https://powerbi.microsoft.com/en-us/

Xpages: Can you build a Dojo Data Grid with a with a Rest service in a separate XPage?

I have created an Xpage with only one element, a JSON Rest service that points to a view (I guess I should probably put this in a CC).
I want to build another Xpage with a CC that contains a CC that contains a Dojo Data Grid that points to this rest service.
How can I do that? It seems to me that I should separate out my calls to the data from the interface. I am surprised that this is not easier to do.
As Knut mentioned, the xp:include tag (the Include Page control) seems to be the easiest solution.
You don't have to move the REST service to a custom control, though. You can just include the page with the REST service on the same page that contains your grid custom control (or on the grid custom control itself).
Then, in the grid's storeComponentId property of the grid control, you can specify the ID of the REST service and the server will be able to resolve it.
Put your REST service in a CC and include it into your Dojo Data Grid control XPages/CC.
<xp:include
id="restService"
pageName="restServiceCC.xsp" />
Don't forget to add ".xsp" to the name of your CC.
Update
To use include is the (only) way to separate the Dojo Data Grid control and the REST service in separate XPages/CC as you asked in your question.
As REST services can be separate design elements this way you can define all REST services in a template database and let the applications inherit from there. REST services itself can provide data from any database/view.
The Dojo Data Grid control is the easiest way to include Data Grids to your applications but it needs the REST service to be in the database itself.
As an alternative you can use a "pure" Data Grid based on client side JavaScript. Data Grids get their data usually from an URL per Ajax. This would give you the possibility to put all REST services in one database. You have much more flexibility with this approach than using the Dojo Data Grid control. But, be aware that it needs some days to get into it. I use the free jqGrid based on jQuery as the "pure" Data Grid. You can find more information about it in my presentation at EntwicklerCamp 2014 (sorry, its in German - Google translator is your friend) including a comparison with Dojo Data Grid and ExtJs Grid.

Google Charts Data security

We are considering using Google charts for our project but we have highly confidential data. Can you use Google Charts without sending the data to Google?
Also, can we run this as a server charting tool also?
You may want to read Google Chart's section on security: https://google-developers.appspot.com/chart/interactive/docs/security_privacy
Specifically:
Google also does not keep the private data stored in a chart: charts where data is uploaded to Google servers is only done so for the purpose of rendering the charts for you. chart data uploaded to Google servers is maintained a short while for debugging purposes, and then discarded.
And
All Google-authored charts are developed with privacy and security considerations in mind. All Google chart documentation pages include a data policy section that describes whether a chart sends any chart data from the page.
EDIT: Like the quote above says, the data policy for each chart is contained in the documentation for that individual chart. For example: https://google-developers.appspot.com/chart/interactive/docs/gallery/areachart#Data_Policy

Sharepoint: Best way to display lists of non-Sharepoint content with "compatible" UI?

I've built a web part for Sharepoint that retrieves data from an external service. I'd like to display the items in a way that's UI-compatible with Sharepoint (fits in with its surroundings.)
I'm aware of the "DataFormWebPart" but was unable to get one working properly. It requires a valid DataSource and I was unable to build one from the results of a web service call... Part of the problem is that my web service wrappers don't expose the XML return info, rather I have a bunch of deserialized objects. There doesn't seem to be an easy way to turn actual objects into a datasource, or populate a "generic" datasource from object data.
I could use an SPGridView to get the same UI, but the grid control doesn't have much in the way of smarts -and- it forces every field into its own column. I'd prefer to render each list item as a single cell with complex rendering (for instance the way that StackOverflow shows its lists of questions.) I'd also like to get as much of the Sharepoint-standard UI as possible, such as the sorting, filtering, and paging controls.
So, first: Has anyone here written a Sharepoint control that does this, and if so do you have sample code to share? If not: am I overlooking some useful control, whether MS-supplied or available in an external library?
Thanks!
Steve
Sharepoint: Best way to display lists
of non-Sharepoint content with
“compatible” UI?
Take a look at the built in sharepoint web controls:
Microsoft.SharePoint.WebControls Namespace
It contains all the controls used in sharepoint. I'd tell you more, but the documentation is very thorough.
Problem with SharePoint is that there are a bunch of different ways to do this. If your data is not changing too often and is not overly large it may be worth considering entering it into a list for display.
If you have the Enterprise licence it may be worth getting your data into the BDC and using it there.
you may have to convert the objects into xml or use the serialised objects with the XML webpart for display. This still has the issue of custom rendering using XSLT.
Here's a great article that explains how to configure BDC connections to web services using the BDC Definition Editor:
Creating a Web Service Connection by Using the Business Data Catalog Definition Editor
http://msdn.microsoft.com/en-us/library/bb737887.aspx
The best way to do this IMO is to make a Web Part. As a Web Part the UI will be automatically rendered to be the same as the theme the site is using (unless you override it) and it will be able to be placed anywhere by anyone with admin privileges.
Tutorial on making a Web Part
Tutorial on packaging and deploying a Web Part
Example Web Part Source Code
You could create a custom web part and use an SPGridView. You say you don't like it, because it forces every field into its own column, but that's not true. You can create a template (ITemplate) for every column and fully customize what's shown inside it, just like you would using a normal ASP.Net GridView. Using this approach I've added the little "New" images right next to a list item's Title, just like SharePoint does itself.

Resources