g1 issueshttps://code.gramener.com/cto/g1/-/issues2018-09-02T05:35:58Zhttps://code.gramener.com/cto/g1/-/issues/56Add interactive demo docs - Mapviewer, Formhandler Table2018-09-02T05:35:58ZTejeshAdd interactive demo docs - Mapviewer, Formhandler Table* [x] Must be formatted like [UI components docs](https://learn.gramener.com/guide/uicomponents/)
* [x] Mapviewer docs
* [ ] Formhandler Table* [x] Must be formatted like [UI components docs](https://learn.gramener.com/guide/uicomponents/)
* [x] Mapviewer docs
* [ ] Formhandler TableTejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/55data reactive mapviewer2018-08-15T14:22:58ZTejeshdata reactive mapviewer- [ ] Integrate mapviewer with urlfilter. This adds support for sliders, dropdowns and input filters.
- [ ] On change of dataset by `urlfilter` or `g1.datafilter`, the layers rendered with corresponding data must redraw themselves eff...- [ ] Integrate mapviewer with urlfilter. This adds support for sliders, dropdowns and input filters.
- [ ] On change of dataset by `urlfilter` or `g1.datafilter`, the layers rendered with corresponding data must redraw themselves efficientlyTejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/54[Mapviewer] Feature request - Filter regions based on click events2018-08-13T09:22:53ZAnvesh Dasari[Mapviewer] Feature request - Filter regions based on click eventsUttar Pradesh map
![uttar-pradesh](/uploads/006272c52a62c3d8e6ce533bde1bf55c/uttar-pradesh.PNG)
On clicking a region, highlight the clicked region
![uttar-pradesh-filtered](/uploads/78389e3367a7ada13055df1ffd2f87bb/uttar-pradesh-filte...Uttar Pradesh map
![uttar-pradesh](/uploads/006272c52a62c3d8e6ce533bde1bf55c/uttar-pradesh.PNG)
On clicking a region, highlight the clicked region
![uttar-pradesh-filtered](/uploads/78389e3367a7ada13055df1ffd2f87bb/uttar-pradesh-filtered.PNG)1.40TejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/53FormHandler Table - Feature to disable column options2019-02-05T10:18:58ZBhanu Kbhanu.kamapantula@gramener.comFormHandler Table - Feature to disable column optionsCurrently, column options are enabled by default
![fh-table-column-options](/uploads/951039e00889a78d3dafbce5132e1f2d/fh-table-column-options.png)
It would be good to have an option to disable it.Currently, column options are enabled by default
![fh-table-column-options](/uploads/951039e00889a78d3dafbce5132e1f2d/fh-table-column-options.png)
It would be good to have an option to disable it.1.51TejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/52Unable to edit g1 FormHandler2018-06-01T13:49:44ZHari deepuUnable to edit g1 FormHandler### Summary
Values edited in FormHandler table aren't updated in database.
### Steps to Reproduce
- Edit a value in FormHandler Table
- Save the updated values, it works fine
- Reload the page, old values are displayed
gramex.yaml en...### Summary
Values edited in FormHandler table aren't updated in database.
### Steps to Reproduce
- Edit a value in FormHandler Table
- Save the updated values, it works fine
- Reload the page, old values are displayed
gramex.yaml end point:
```yaml
pmrssm-form-available-state-info:
pattern: /$YAMLURL/table_available_states_info
handler: FormHandler
kwargs:
url: 'mysql://$MYSQL_USER:$MYSQL_PASSWORD@$MYSQL_HOST/pmrssm_forms_db'
query: select * from available_states_info;# DB Query
table: available_states_info
id: [state_code, district_code, mobile_number]
```
javascript
```javascript
<script>
$(window).on('load', function () {
$('.formhandler').formhandler({
columns:[{name: '*'},{editable: true}],
edit: true,
table: true
})
});
</script>
```
1.37TejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/51mapviewer fails on valid TopoJSON2018-06-04T03:50:05ZS Anandmapviewer fails on valid TopoJSONRun this code:
```
<div id="topojson-map" style="height:300px">
<script>
var map = g1.mapviewer({
id: 'topojson-map',
layers: {
worldMap: { type: 'tile', url: 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.pn...Run this code:
```
<div id="topojson-map" style="height:300px">
<script>
var map = g1.mapviewer({
id: 'topojson-map',
layers: {
worldMap: { type: 'tile', url: 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png' },
usopojson: {
type: 'topojson',
url: 'us-10m.v1.json',
}
}
})
</script>
```
... with [us-10m.v1.json](https://github.com/d3/d3.github.com/blob/master/us-10m.v1.json)
This raises the following error:
![image](/uploads/49e4f787df9a494f48fa09d34f12b5d1/image.png)TejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/50Implement a time slider component2019-03-05T03:02:19ZTejeshImplement a time slider componenthttps://code.gramener.com/cto/g1/-/issues/49showcase g1 features demo on UAT2018-06-18T04:18:33ZTejeshshowcase g1 features demo on UATdeploy g1 demo tests on uat which could be used by developers to understand/refer how to use g1 features.deploy g1 demo tests on uat which could be used by developers to understand/refer how to use g1 features.TejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/48Drill down feature in MapViewer2018-06-07T03:40:13ZSundeep Reddy MalluDrill down feature in MapViewer### Summary
Ability to show more granularity maps on clicking on geojson layers.
### Usage
```js
drilldown: {
rootLayer: 'indiaGeojson',
drilldown_levels: ['STATE_N', 'DISTRICT', 'VILL'],
nextLayer: fun...### Summary
Ability to show more granularity maps on clicking on geojson layers.
### Usage
```js
drilldown: {
rootLayer: 'indiaGeojson',
drilldown_levels: ['STATE_N', 'DISTRICT', 'VILL'],
nextLayer: function(name) {
return {
layerName: name + '_layer',
layerOptions: {
url: name + '.geojson',
type: 'geojson',
attrs: {
fillColor: {
metric: 'TOT_P',
range: 'RdYlGn'
}
}
}
}
}
}
```
### Examples
(Add code samples of usage, with expected output)1.37TejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/47Documentation tweaks2018-06-06T09:59:00ZTejeshDocumentation tweaks* [ ] improve documentation for highlighter
* [x] reorder urlfilter documentation. Now, formhandler and sanddance docs are in between* [ ] improve documentation for highlighter
* [x] reorder urlfilter documentation. Now, formhandler and sanddance docs are in betweenhttps://code.gramener.com/cto/g1/-/issues/46Add eslint check to npm run test2018-06-06T10:00:41ZPratap Vardhanpratap.vardhan@gramener.comAdd eslint check to npm run testCurrently, CI build runs `npm run test`, which doesn't include `eslint` check.
One approach would be -- in `package.json`, add `npm run lint` to `pretest`?
```json
{ ....,
"scripts": {
"lint": "eslint index.js src",
...
...Currently, CI build runs `npm run test`, which doesn't include `eslint` check.
One approach would be -- in `package.json`, add `npm run lint` to `pretest`?
```json
{ ....,
"scripts": {
"lint": "eslint index.js src",
...
"pretest": "npm run lint && npm run build && browserify -s tape -r tape -o test/tape.js",
},
...
}
```https://code.gramener.com/cto/g1/-/issues/45create label and positional annotation component2018-04-29T05:12:57ZTejeshcreate label and positional annotation componentsample spec
```js
var chart = g1.createChart('scatterplot', data, options)
chart.annotate(position, text, styles)
chart.label(data, {
label: {
col_name: [...],
//example
Continent: ['Asia', 'Europe'],
ID: ['AND', 'ARB'...sample spec
```js
var chart = g1.createChart('scatterplot', data, options)
chart.annotate(position, text, styles)
chart.label(data, {
label: {
col_name: [...],
//example
Continent: ['Asia', 'Europe'],
ID: ['AND', 'ARB']
},
highlight: true,
auto: false
})
```
src: https://blog.datawrapper.de/weeklychart-biocapacity/
![image](/uploads/2cd992ce4538eb92ae519e8b45ca3ffe/image.png)https://code.gramener.com/cto/g1/-/issues/44add hide column feature to formhandler table - doesnot render the column in t...2018-05-24T16:16:25ZTejeshadd hide column feature to formhandler table - doesnot render the column in the first pain itself### Summary
Currently, to not display a column in formhandler table, developers have to not mention it in `columns`. But when `*` is given as a name, it displays all columns. No way developer could not render specific columns.
### Bene...### Summary
Currently, to not display a column in formhandler table, developers have to not mention it in `columns`. But when `*` is given as a name, it displays all columns. No way developer could not render specific columns.
### Benefits
Admin module requires this.
### Usage
```js
$('.hide_col')
.formhandler({
columns: [
{ name: '*'},
{
name: 'Continent',
hide: true
}
]
})
```1.34TejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/43Sanddance facets2018-04-25T12:38:46ZS AnandSanddance facets```js
var barchart = g1.sanddance({
layout: 'grid'
width: 100,
height: 100,
// Group by category, which is a number from 0 - 3
group: function(d) { return d.category },
facets: [
{x: 0, y: 0, width: 100, height: 20},
...```js
var barchart = g1.sanddance({
layout: 'grid'
width: 100,
height: 100,
// Group by category, which is a number from 0 - 3
group: function(d) { return d.category },
facets: [
{x: 0, y: 0, width: 100, height: 20},
{x: 0, y: 25, width: 100, height: 20},
{x: 0, y: 50, width: 100, height: 20},
{x: 0, y: 75, width: 100, height: 20},
],
data: data
})
d3.selectAll('circle')
.data(data)
.call(barchart)
```
... should create something like this:
![image](/uploads/9d579860345aa8e8b41ce444c3fb4125/image.png)Elango BharathiElango Bharathihttps://code.gramener.com/cto/g1/-/issues/42formhandler table cell link is not urlencoded2019-03-01T04:00:22ZTejeshformhandler table cell link is not urlencoded### Summary
formhandler table cell link is not urlencoded
### Steps to reproduce
g1 version 0.6.0
visit https://uat.gramener.com/fdd/#?SEGMENT=M%26M and click on Segment column value `M&M`. Filtering fails because `&` in `M&M` is not...### Summary
formhandler table cell link is not urlencoded
### Steps to reproduce
g1 version 0.6.0
visit https://uat.gramener.com/fdd/#?SEGMENT=M%26M and click on Segment column value `M&M`. Filtering fails because `&` in `M&M` is not urlencoded
### Possible fixes
Need to add a test case and verify the issue. Expected behavior of current code is urlencoded string but that's not the case.1.51S AnandS Anandhttps://code.gramener.com/cto/g1/-/issues/41Merge basic mapviewer2018-05-29T03:01:33ZS AnandMerge basic mapviewer- [x] circleMarker zooms to bounds. marker should do the same
- [x] Tooltip titles for marker and circleMarker to be implemented
- [x] Use g1.scale
- [ ] `attr: {color: 'red'}` should be moved to `options: {color: 'red'}`
- [x] Rename `a...- [x] circleMarker zooms to bounds. marker should do the same
- [x] Tooltip titles for marker and circleMarker to be implemented
- [x] Use g1.scale
- [ ] `attr: {color: 'red'}` should be moved to `options: {color: 'red'}`
- [x] Rename `attr:` to `attrs:`
- [x] Add tooltips to show one or more columns1.36TejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/40Allow urlfilter to work with dropdown select and options2018-08-07T10:02:12ZTejeshAllow urlfilter to work with dropdown select and optionsPragnya Reddypragnya.reddy@gramener.comPragnya Reddypragnya.reddy@gramener.comhttps://code.gramener.com/cto/g1/-/issues/39Editor2018-04-16T05:58:17ZTejeshEditor### Summary
To build editor capability similar to [ui toast](http://ui.toast.com/)
### Benefits
Lets non-developers use g1 components and build charts### Summary
To build editor capability similar to [ui toast](http://ui.toast.com/)
### Benefits
Lets non-developers use g1 components and build chartshttps://code.gramener.com/cto/g1/-/issues/38Formhandler Table - Add/Delete new rows2018-04-16T09:47:05ZTejeshFormhandler Table - Add/Delete new rows### Summary
Formhandler table to support adding new rows to the table
### Benefits
Admin module - Add new user feature if done using this feature, will be a single line of configuration.
### Usage
```js
$('.formhandler').formhandler(...### Summary
Formhandler table to support adding new rows to the table
### Benefits
Admin module - Add new user feature if done using this feature, will be a single line of configuration.
### Usage
```js
$('.formhandler').formhandler({
src: ....,
...
...
addRow: true / false(default )
})
```TejeshTejeshhttps://code.gramener.com/cto/g1/-/issues/37Add FormHandler cell template2018-04-16T05:13:52ZS AnandAdd FormHandler cell templateFor table coloring, FormHandler options supports a `columns[...].template` in addition to `columns[...].format`.
By default, the template is the same for all columns, and creates a `<td>` with a link inside.
This can be overridden usin...For table coloring, FormHandler options supports a `columns[...].template` in addition to `columns[...].format`.
By default, the template is the same for all columns, and creates a `<td>` with a link inside.
This can be overridden using `columns[...].template`. This has access to the following variables:
- `value`: unformatted value of the cell data
- `display`: the formatted display value, which is the output of `.format`
- `link`: if a `.link` attribute exists, this is the result of that `.link`. Else it is `?col=value&_offset=`