-
Notifications
You must be signed in to change notification settings - Fork 238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
expose option to decode domain values #450
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking good so far!
docs/index.html
Outdated
<!-- load the arcgis-rest-js scripts --> | ||
<script src="https://unpkg.com/@esri/arcgis-rest-request@1.7.1/dist/umd/request.umd.min.js"></script> | ||
<script src="https://unpkg.com/@esri/arcgis-rest-feature-service@1.7.1/dist/umd/feature-service.umd.min.js"></script> | ||
<!-- you should have to load arcgis-rest-js scripts, but right now cedar bundles them! --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should have been taken care of in https://github.com/Esri/cedar/pull/421/files - I must have missed something, or done something wrong...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'll tackle this in #391
packages/cedar/src/dataset.ts
Outdated
@@ -1,16 +1,17 @@ | |||
import { IFeature, IFeatureSet } from '@esri/arcgis-rest-common-types' | |||
import { IField as IRestField, IFeature, IFeatureSet } from '@esri/arcgis-rest-common-types' | |||
|
|||
export interface IField { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: deprecate this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unfortunately not. your IField
interface is its own beast.
@@ -66,7 +67,7 @@ function getDatasetData(dataset, datasetsData, name?) { | |||
// return only the attributes for each feature | |||
function flattenData(data) { | |||
const features = getFeatures(data) | |||
if ((features[0] as IFeature).attributes) { | |||
if (features.length > 0 && (features[0] as IFeature).attributes) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you!
packages/cedar/src/query/query.ts
Outdated
names.push({ | ||
// TODO: make name required on datasets, or required if > 1 dataset? | ||
name: dataset.name || `dataset${i}`, | ||
url: dataset.url |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can revert the names
array back on an array of strings, right?
packages/cedar/src/query/query.ts
Outdated
} | ||
}) | ||
} | ||
return Promise.all(requests) | ||
.then((responses) => { | ||
// turn the array of responses into a hash keyed off the dataset names | ||
const responseHash = responses.reduce((hash, response, i) => { | ||
hash[names[i]] = responses[i] | ||
return hash | ||
hash[names[i].name] = response; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert this too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whoops!
packages/cedar/src/query/query.ts
Outdated
}, {}) | ||
return Promise.resolve(responseHash) | ||
return Promise.resolve(responseHash); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ZOMG tslint, what is it you would say you do around here?
Assuming we decide to add |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pushed a few edits to address feedback after confirming locally that i could pass along domains
to the bar-grouped.json sample too.
docs/index.html
Outdated
<!-- load the arcgis-rest-js scripts --> | ||
<script src="https://unpkg.com/@esri/arcgis-rest-request@1.7.1/dist/umd/request.umd.min.js"></script> | ||
<script src="https://unpkg.com/@esri/arcgis-rest-feature-service@1.7.1/dist/umd/feature-service.umd.min.js"></script> | ||
<!-- you should have to load arcgis-rest-js scripts, but right now cedar bundles them! --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'll tackle this in #391
travis is asleep right now, but running
i tried to add a new test with a new definition that includes a dataset with |
relies on Esri/arcgis-rest-js#392 and Esri/arcgis-rest-js#394
chart w/ more than 1 dataset (this can be test instead of an example if that's easier)pie chart? (maybe)line/area (pretty much the same as bar)