Predix_Logo
  • Categories
    • Questions
    • Predix | Updates
      • Pricing
      • Product
    • Deloitte - Private
    • How-To
    • Accenture-Private
  • Explore
    • Topics
    • Questions
    • Articles
    • Feedback or Feature Requests
  • Sign in
  • Home /
  • Questions /
avatar image
0
Question by Donald · Nov 18, 2016 at 03:32 PM · time-series-serviceviews-service

Data Query implementation in the UI seed app via View-Service and Timeseries

Hi all,

I got an issue regarding data query implementation in the predix ui-seed app.

I want to implement a line chart, that shows the data, In the blankpage-view.html in the path predix-seed/public/elements/views I added the following:


     <px-simple-line-chart width="auto"
       min="0.5" max="3.0"
       columns="5" rows="3"
       line-data='[[1397102460000,1.99],[1397139660000,1.92],[1397177400000,1.97],
       [1397228040000,1.12]]'
       threshold="1.8"
       min-label="min"
       max-label="max">
   </px-simple-line-chart>


But in this example, the Data is given to the line chart via hard code - how do I implement the data query from the view-service?

I found ([here][1]) a method to query the data with a GET request - but in which file do I put this?

 this.getData('http://weather.com/sanramon', {headers: {'my-header-name': 'my-header-value'}}).then(function(data) {
     // on fulfillment
     self.currentTemperature = data.value;
 }, function(reason) {
     // on rejection
     console.error('ERROR', reason);
 });

and is this the right code? In which file is it supposed to go? (predix-seed/public/bower_components/px-sample-cards/time-series-card.html maybe?) And what part of the code is supposed to go in the

Comment
Add comment
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

  • Sort: 
avatar image
0

Answer by Greg Stroup · Nov 21, 2016 at 08:35 AM

We're working on adding some sample code for that now. At the moment, it's on a branch in the predix-seed:

https://github.com/PredixDev/predix-seed/tree/microservice-integration

Take a look at the winddata-view.html file. It shows how to call mock data, time series directly, and a custom wind data microservice.

Comment
Add comment · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Follow this Question

Answers Answers and Comments

75 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Display time series data on UI 3 Answers

Time Series plot update 1 Answer

Time Series latest datapoints query provide latest time stamp but not node value 1 Answer

Time Series Query - Number of Tags Limit in ane query 3 Answers

Regarding Time Series tags and their case sensitivity 2 Answers

GE Monogram
  • Legal
  • Cookies
  • Forum Terms
  • Contact Us
  • Copyright © 2017 General Electric Company. All rights reserved.


Enterprise
Social Q&A

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Submit your feedback or feature request
  • Categories
  • Questions
  • Predix | Updates
    • Pricing
    • Product
  • Deloitte - Private
  • How-To
  • Accenture-Private
  • Explore
  • Topics
  • Questions
  • Articles
  • Feedback or Feature Requests