Sencha touch Json Data only showing 2 records - sencha-touch

I just created a small app with Sencha touch List and Json reader. There are more then 30 records but it is only showing 2 data records.
Here are the codes:
Ext.regModel('Story', {
idProperty: 'story_id',
fields: [
{name: "story_id", type: "int"},
{name: "id", type: "int"},
{name: "category_id", type: "int"},
{name: "story_content", type: "string"},
{name: "image", type: "string"},
{name: "story_posted_on", type: "date"},
{name: "story_modified_on", type: "date"},
{name: "active_status", type: "int"}
]
});
Ext.regStore('StoryStore', {
model: 'Story',
sorters: [{
property: 'story_posted_on',
direction: 'DESC'
}],
autoLoad: true,
proxy: {
type: 'ajax',
url: '../backend/index.php?r=stories/getStories',
},
reader: {
type: 'json',
}
});
App.views.FMJList = new Ext.List({
id: 'FMJList',
store: 'StoryStore',
itemTpl: '<div class="story">'+
'<div class="story_content">'+
'<tpl if="image">'+
'<div class="story_img" style="background-image: url(http://localhost/app/uploads/stories/{image});"></div>'+
'</tpl>'+
'<div class="story_content">{story_content}</div>'+
'<div class="story_display_name">{id}</div>'+
'</div>'+
'</div>'
});
Any thoughts on that? Thanks in advance.
Here is the Json response:
[
{
story_id: "193",
id: "4",
category_id: "74",
story_content: "testing",
image: "1328009566.png",
story_liked: "0",
story_empathy: "0",
story_deserve: "0",
story_posted_on: "2012-01-31 07:32:46",
story_modified_on: "2012-02-01 05:21:11",
active_status: "2"
},
{
story_id: "194",
id: "4",
category_id: "74",
story_content: "test",
image: "",
story_liked: "0",
story_empathy: "0",
story_deserve: "0",
story_posted_on: "2012-02-01 12:48:43",
story_modified_on: "2012-02-01 05:19:16",
active_status: "2"
},
{
story_id: "195",
id: "4",
category_id: "74",
story_content: "face",
image: "",
story_liked: "0",
story_empathy: "0",
story_deserve: "0",
story_posted_on: "2012-02-01 06:59:24",
story_modified_on: "2012-02-01 06:59:24",
active_status: "1"
},
{
story_id: "196",
id: "4",
category_id: "74",
story_content: "testing image",
image: "",
story_liked: "0",
story_empathy: "0",
story_deserve: "0",
story_posted_on: "2012-02-01 07:07:59",
story_modified_on: "2012-02-01 07:10:29",
active_status: "2"
},
{
story_id: "197",
id: "1",
category_id: "74",
story_content: "update image",
image: "",
story_liked: "0",
story_empathy: "0",
story_deserve: "0",
story_posted_on: "2012-02-01 07:11:49",
story_modified_on: "2012-02-01 07:11:49",
active_status: "1"
},
{
story_id: "198",
id: "1",
category_id: "74",
story_content: "testing",
image: "1328094802.jpg",
story_liked: "0",
story_empathy: "0",
story_deserve: "0",
story_posted_on: "2012-02-01 07:13:22",
story_modified_on: "2012-02-01 07:15:09",
active_status: "2"
},
{
story_id: "199",
id: "4",
category_id: "74",
story_content: "teste",
image: "1328178474.jpg",
story_liked: "0",
story_empathy: "0",
story_deserve: "0",
story_posted_on: "2012-02-02 10:27:54",
story_modified_on: "2012-02-02 10:27:54",
active_status: "1"
},
{
story_id: "200",
id: "4",
category_id: "74",
story_content: "test",
image: "",
story_liked: "0",
story_empathy: "0",
story_deserve: "0",
story_posted_on: "2012-02-02 10:32:18",
story_modified_on: "2012-02-02 10:32:18",
active_status: "1"
},
{
story_id: "201",
id: "4",
category_id: "74",
story_content: "test again",
image: "",
story_liked: "0",
story_empathy: "0",
story_deserve: "0",
story_posted_on: "2012-02-02 10:32:40",
story_modified_on: "2012-02-02 10:32:40",
active_status: "1"
}]
figured out the problem is actually the idProperty: 'story_id'. idProperty by default is set id and it's unique, the idProperty is not overriding the default value I think. Anyone know a way to fix?

Related

How do I write the SQL code to generate a 4-level JSON output?

I'm trying to create a 4-level json. What is messing me up is the "skus" level here. I'm trying to create a groups level, then a skus level, a fieldInfo level and within that all the field values etc for all the skus in a given group.
Here is a sample of my data:
SKU
FieldGroup
GroupSort
FieldName
FieldSort
GroupBackgroundColor
LabelName
DefaultValue
RB130-9-H-S21D2-PID-OS
Compliance
9
item_volume_unit_of_measure
246
CC9999
item_volume_unit_of_measure
RB130-9-H-S21D2-PID-OS
Product Enrichment
6
leg_style
172
BBA680
Leg Style
RB130-9-H-S21D2-PID-OS
Basic
4
apparel_size_class
56
F8A45E
Apparel Size Class
RB130-9-H-S21D2-PID-OS
Basic
4
shirt_size_class
51
F8A45E
Shirt Size Class
RB130-9-H-S21D2-PID-OS
Dimensions
7
item_height
198
8DB4E2
Item Height
RB130-9-H-S21D2-PID-OS
Variation
3
parent_sku
43
FF8080
Parent SKU
RB130-9-H-S21D2-SSKC-OS
Variation
3
parent_sku
43
FF8080
Parent SKU
RB130-9-H-S21D2-SSKC-OS
Dimensions
7
item_height
198
8DB4E2
Item Height
RB130-9-H-S21D2-SSKC-OS
Basic
4
shirt_size_class
51
F8A45E
Shirt Size Class
RB130-9-H-S21D2-SSKC-OS
Basic
4
apparel_size_class
56
F8A45E
Apparel Size Class
RB130-9-H-S21D2-SSKC-OS
Product Enrichment
6
leg_style
172
BBA680
Leg Style
RB130-9-H-S21D2-SSKC-OS
Compliance
9
item_volume_unit_of_measure
246
CC9999
item_volume_unit_of_measure
What I'm trying to accomplish is something like this:
{
"groups": [{
"group": "Group1",
"skus": [{
"sku": "xxx",
"fieldInfo": [{
"fieldName": "field1",
"value": "1"
}, {
"fieldName": "2",
"fieldValue": "2"
}]
}, {
"sku": "yyy",
"fieldInfo": [{
"fieldName": "field1",
"value": "1"
}, {
"fieldName": "2",
"fieldValue": "2"
}]
}]
}, {
"group": "Group2",
"skus": [{
"sku": "xxx",
"fieldInfo": [{
"fieldName": "field1",
"value": "1"
}, {
"fieldName": "2",
"fieldValue": "2"
}]
}, {
"sku": "yyy",
"fieldInfo": [{
"fieldName": "field1",
"value": "1"
}, {
"fieldName": "2",
"fieldValue": "2"
}]
}]
}, {
"group": "Group3",
"skus": [{
"sku": "xxx",
"fieldInfo": [{
"fieldName": "field1",
"value": "1"
}, {
"fieldName": "2",
"fieldValue": "2"
}]
}, {
"sku": "yyy",
"fieldInfo": [{
"fieldName": "field1",
"value": "1"
}, {
"fieldName": "2",
"fieldValue": "2"
}]
}]
}]
}
My code so far:
select (
select fieldGroup, max(groupbackgroundcolor) backgroundcolor,JSON_Query(max(skuinfo.skus)) skuinfo
from Amazon.AmazonSpreadsheetData sd
cross apply (
select (select sd2.sku, JSON_Query(max(fieldinfo.fields)) fieldInfo from Amazon.AmazonSpreadsheetData sd2
cross apply (
select (select fieldid, FieldName,LabelName,DefaultValue
from Amazon.AmazonSpreadsheetData sd3
where sd3.sku=sd2.sku
and sd3.fieldgroup=sd2.fieldgroup
and sd3.collectionid=sd2.collectionid
and sd3.deliveryDate=sd2.deliverydate
and sd3. TemplateName=sd2.templatename
and sd3.productType=sd2.producttype
order by sd3.parentchildsort, sd3.fieldSort for JSON path ) fields
) fieldInfo
where sd2.fieldgroup=sd.fieldgroup
and sd2.sku=sd.sku
and sd2.collectionid=sd.collectionid
and sd2.deliveryDate=sd.deliverydate
and sd2.TemplateName=sd.templatename
and sd2.productType=sd.producttype
group by sd2.sku
order by max(sd2.parentchildsort), sd2.sku
for JSON path )skus
--order by parentchildsort,sd.sku for JSON path
) skuInfo
where collectionid=524
and sd.deliveryDate='2021-02-15'
and sd.TemplateName='Boys'
and sd.productType='pants'
and sd.sku like '%RB130-9-%'
group by fieldgroup
--order by max(groupsort)
for JSON path, root('Groups')
) jstring
But all that does is gets the max sku for each group:
{
"Groups": [{
"fieldGroup": "Basic",
"backgroundcolor": "F8A45E",
"skuinfo": [{
"sku": "RB130-9-H-S21D2-SSKC-OS",
"fieldInfo": [{
"fieldid": 220702,
"FieldName": "update_delete",
"LabelName": "Update Delete",
"DefaultValue": "Update"
}, {
"fieldid": 221206,
"FieldName": "product_description",
"LabelName": "Product Description",
"DefaultValue": "descrip"
}]
}]
}, {
"fieldGroup": "Compliance",
"backgroundcolor": "CC9999",
"skuinfo": [{
"sku": "RB130-9-H-S21D2-SSKC-OS",
"fieldInfo": [{
"fieldid": 221390,
"FieldName": "fabric_type",
"LabelName": "Fabric Type",
"DefaultValue": ""
}, {
"fieldid": 220742,
"FieldName": "import_designation",
"LabelName": "Import Designation",
"DefaultValue": ""
}]
}]
}, {
"fieldGroup": "Dimensions",
"backgroundcolor": "8DB4E2",
"skuinfo": [{
"sku": "RB130-9-H-S21D2-SSKC-OS",
"fieldInfo": [{
"fieldid": 221478,
"FieldName": "chest_size",
"LabelName": "Chest Size",
"DefaultValue": ""
}, {
"fieldid": 220930,
"FieldName": "chest_size_unit_of_measure",
"LabelName": "Chest Size Unit Of Measure",
"DefaultValue": ""
}]
}]
}, {
"fieldGroup": "Discovery",
"backgroundcolor": "92D050",
"skuinfo": [{
"sku": "RB130-9-H-S21D2-SSKC-OS",
"fieldInfo": [{
"fieldid": 220842,
"FieldName": "bullet_point1",
"LabelName": "Key Product Features",
"DefaultValue": ""
}, {
"fieldid": 221502,
"FieldName": "bullet_point2",
"LabelName": "Key Product Features",
"DefaultValue": ""
}]
}]
}, {
"fieldGroup": "Fulfillment",
"backgroundcolor": "B7DEE8",
"skuinfo": [{
"sku": "RB130-9-H-S21D2-SSKC-OS",
"fieldInfo": [{
"fieldid": 221190,
"FieldName": "fulfillment_center_id",
"LabelName": "Fulfillment Center ID",
"DefaultValue": "DEFAULT"
}, {
"fieldid": 221422,
"FieldName": "package_height",
"LabelName": "Package Height",
"DefaultValue": ""
}]
}]
}, {
"fieldGroup": "Images",
"backgroundcolor": "FFFF00",
"skuinfo": [{
"sku": "RB130-9-H-S21D2-SSKC-OS",
"fieldInfo": [{
"fieldid": 221358,
"FieldName": "other_image_url1",
"LabelName": "Other Image URL1",
"DefaultValue": ""
}, {
"fieldid": 220858,
"FieldName": "other_image_url2",
"LabelName": "Other Image URL2",
"DefaultValue": ""
}]
}]
}, {
"fieldGroup": "Offer",
"backgroundcolor": "FF0000",
"skuinfo": [{
"sku": "RB130-9-H-S21D2-SSKC-OS",
"fieldInfo": [{
"fieldid": 221014,
"FieldName": "list_price",
"LabelName": "Manufacturer's Suggested Retail Price",
"DefaultValue": ""
}, {
"fieldid": 221414,
"FieldName": "map_price",
"LabelName": "Minimum Advertised Price",
"DefaultValue": ""
}]
}]
}, {
"fieldGroup": "Product Enrichment",
"backgroundcolor": "BBA680",
"skuinfo": [{
"sku": "RB130-9-H-S21D2-SSKC-OS",
"fieldInfo": [{
"fieldid": 221398,
"FieldName": "bottom_style",
"LabelName": "Bottom Style",
"DefaultValue": ""
}, {
"fieldid": 220798,
"FieldName": "subject_character",
"LabelName": "character",
"DefaultValue": ""
}]
}]
}, {
"fieldGroup": "Required",
"backgroundcolor": "FCD5B4",
"skuinfo": [{
"sku": "RB130-9-H-S21D2-SSKC-OS",
"fieldInfo": [{
"fieldid": 221418,
"FieldName": "feed_product_type",
"LabelName": "Product Type",
"DefaultValue": "pants"
}, {
"fieldid": 220758,
"FieldName": "item_sku",
"LabelName": "Seller SKU",
"DefaultValue": "KP-RB130-9-S21D2"
}]
}]
}, {
"fieldGroup": "Variation",
"backgroundcolor": "FF8080",
"skuinfo": [{
"sku": "RB130-9-H-S21D2-SSKC-OS",
"fieldInfo": [{
"fieldid": 220934,
"FieldName": "parent_child",
"LabelName": "Parentage",
"DefaultValue": "Parent"
}, {
"fieldid": 221538,
"FieldName": "parent_sku",
"LabelName": "Parent SKU",
"DefaultValue": ""
}, {
"fieldid": 221234,
"FieldName": "relationship_type",
"LabelName": "Relationship Type",
"DefaultValue": "Variation"
}, {
"fieldid": 221030,
"FieldName": "variation_theme",
"LabelName": "Variation Theme",
"DefaultValue": "SizeColor"
}]
}]
}]
}
I'm missing a step or a group by or something.
Thank you.

Sql Json - Update Json Property within an Array using SQL Server 2017 Express

i Have this Json:
{
"pType": "1",
"pTitle": "A Product",
"pProds": [{
"formM": 1,
"sDesc": "A Product",
"lDesc": "A Product",
"pColor": "#000000",
"pSize": "L",
"postage": "2",
"quatity": 2,
"aPrice": "2",
"rPrice": "2",
"Discounted": "2",
"Price": "2",
"p_Num": "466ff237439a44be9d8fcc4725c28e4c",
"images": [{
"mN": 1,
"idImage": "image1",
"fileName": "39b06cc1aeb94e0c868d9b4e8174e2d5.jpeg",
"bytes": "/img/ProdImages/466ff237439a44be9d8fcc4725c28e4c/39b06cc1aeb94e0c868d9b4e8174e2d5.jpeg"
}]
}, {
"formM": 0,
"sDesc": "",
"lDesc": "",
"pColor": "",
"pSize": "0",
"postage": "0",
"quatity": 0,
"aPrice": "0",
"rPrice": "0",
"Discounted": "0",
"Price": "0",
"p_Num": "b8cf1caa638b48a2a3111b6d78c90b74",
"images": []
}]
}
What i would like to do is update the quatity (miss spelled) value by a given id which is p_Num.
So if i needed to update quatity from 2 to 55 by p_Num equalling '466ff237439a44be9d8fcc4725c28e4c'
How would i achieve this?

How to map data in an array to another array output with different index in Mule Dataweave

I have an JSON like this:
{
"invoice-line": [
{
"id": "01",
"date": "2019-06-21",
"sales-date": "2019-06-21",
"line-num": "1",
"item": "Mouse",
"descrption": "This is line 1 item"
},
{
"id": "02",
"date": "2019-06-21",
"sales-date": "2019-06-21",
"line-num": "2",
"item": "Keyboard",
"descrption": "This is line 2 item"
},
{
"id": "03",
"date": "2019-06-21",
"sales-date": "2019-06-21",
"line-num": "3",
"item": "Monitor",
"descrption": "This is line 3 item"
}
]
}
From this input JSON we need to extract the data and map into another output JSON but with a logic:
when line-num = 1 then map id, date, sales-date, description
then rest or the array will map id, item, descrption
Which will look like below:
{
"row": [
{
"id": "01",
"date": "2019-06-21",
"sales-date": "2019-06-21",
"line-num": "1",
"item": "",
"descrption": "This is line 1 item"
},
{
"id": "02",
"date": "",
"sales-date": "",
"line-num": "",
"item": "Mouse",
"descrption": "This is line 2 item"
},
{
"id": "03",
"date": "",
"sales-date": "",
"line-num": "",
"item": "Monitor",
"descrption": "This is line 3 item"
}
]
}
Also is that possible to perform something like mapping array item (first index) to different output array? For example:
{
"row": [
{
"id": "",
"date": "2019-06-21",
"sales-date": "2019-06-21",
"line-num": "1",
"item": "",
"descrption": ""
},
{
"id": "01",
"date": "",
"sales-date": "",
"line-num": "",
"item": "Keyboard",
"descrption": "This is line 1 item"
},
{
"id": "02",
"date": "",
"sales-date": "",
"line-num": "",
"item": "Mouse",
"descrption": "This is line 2 item"
},
{
"id": "03",
"date": "",
"sales-date": "",
"line-num": "",
"item": "Monitor",
"descrption": "This is line 3 item"
}
]
}
Hopefully this is what you were looking for:
%dw 1.0
%output application/json
---
row:
(payload.invoice-line filter ($.line-num == '1') map {
id: "",
date: $.date,
sales-date: $.sales-date,
line-num: $.line-num,
item: "",
descrption: ""
})
++
(payload.invoice-line map {
id: $.id,
date: "",
sales-date: "",
line-num: "",
item: $.item,
descrption: $.descrption
})
produces:
{
"row": [
{
"id": "",
"date": "2019-06-21",
"sales-date": "2019-06-21",
"line-num": "1",
"item": "",
"descrption": ""
},
{
"id": "01",
"date": "",
"sales-date": "",
"line-num": "",
"item": "Mouse",
"descrption": "This is line 1 item"
},
{
"id": "02",
"date": "",
"sales-date": "",
"line-num": "",
"item": "Keyboard",
"descrption": "This is line 2 item"
},
{
"id": "03",
"date": "",
"sales-date": "",
"line-num": "",
"item": "Monitor",
"descrption": "This is line 3 item"
}
]
}

How can I check checkboxes and disabled in jqxTreeGrid

I am trying to make some of checkboxes checked and disabled in jqxTreeGrid in below code:
$("#treegrid_portfolio").jqxTreeGrid(
{
source: dataAdapter,
pageable: true,
pagerMode: 'advanced',
pageSizeMode: 'root',
pageSize: 5,
pageSizeOptions: ['1', '2', '3', '5', '10'],
columnsResize: true,
sortable: true,
filterable: true,
theme: "custom",
filterMode: 'advanced',
altRows: false,
checkboxes: true,
columnsReorder: true,
hierarchicalCheckboxes: true,
width: getWidth("TreeGrid"),
/*width: "100%",*/
ready: function () {
$("#treegrid_portfolio").jqxTreeGrid('expandRow', '1');
$("#treegrid_portfolio").jqxTreeGrid('expandRow', '2');
}
,
columns: [
{
text: "ID", dataField: "formattedID", width: 120, pinned: true, cellclassname: "requestIdCls", resizable: false
}
,
{
text: '', datafield: 'alert', cellsrenderer: linkrendererAlert, width: 60, pinned: true, cellclassname: "alert_column", cellsAlign: 'center', filterable: false, resizable: false
}
,
{
text: "Portfolio Items Name", dataField: "PortfolioItem_Name", width: 200
}
,
{
text: "Agile Central Project Name", dataField: "AC_ProjectName", width: 200
}
]
}
);
Is it possible to make the same on grid ready function. I have done some research on the jqwidget. But didn't got any solution or clues. Please help me any one.
You need to make below changes also just put id attribute for each of your column data .Then put the id for selecting checkbox to set true.
follow this link i have get a fiddle for you Invoke the uncheckRow method.
var data = [{
"id": "1",
"name": "Corporate Headquarters",
"budget": "1230000",
"location": "Las Vegas",
"children": [{
"id": "2",
"name": "Finance Division",
"budget": "423000",
"location": "San Antonio",
"children": [{
"id": "3",
"name": "Accounting Department",
"budget": "113000",
"location": "San Antonio"
}, {
"id": "4",
"name": "Investment Department",
"budget": "310000",
"location": "San Antonio",
children: [{
"id": "5",
"name": "Banking Office",
"budget": "240000",
"location": "San Antonio"
}, {
"id": "6",
"name": "Bonds Office",
"budget": "70000",
"location": "San Antonio"
}, ]
}]
}, {
"id": "7",
"name": "Operations Division",
"budget": "600000",
"location": "Miami",
"children": [{
"id": "8",
"name": "Manufacturing Department",
"budget": "300000",
"location": "Miami"
}, {
"id": "9",
"name": "Public Relations Department",
"budget": "200000",
"location": "Miami"
}, {
"id": "10",
"name": "Sales Department",
"budget": "100000",
"location": "Miami"
}]
}, {
"id": "11",
"name": "Research Division",
"budget": "200000",
"location": "Boston"
}]
}];
var source = {
dataType: "json",
dataFields: [{
name: "name",
type: "string"
}, {
name: "budget",
type: "number"
}, {
name: "id",
type: "number"
}, {
name: "children",
type: "array"
}, {
name: "location",
type: "string"
}],
hierarchy: {
root: "children"
},
localData: data,
id: "id"
};
var dataAdapter = new $.jqx.dataAdapter(source, {
loadComplete: function () {
}
});
// create jqxTreeGrid.
$("#treeGrid").jqxTreeGrid({
source: dataAdapter,
altRows: true,
width: 680,
theme:'energyblue',
checkboxes: true,
ready: function () {
$("#treeGrid").jqxTreeGrid('expandRow', '1');
$("#treeGrid").jqxTreeGrid('expandRow', '2');
},
columns: [{
text: "Name",
align: "center",
dataField: "name",
width: 300
}, {
text: "Budget",
cellsAlign: "center",
align: "center",
dataField: "budget",
cellsFormat: "c2",
width: 250
}, {
text: "Location",
dataField: "location",
cellsAlign: "center",
align: "center"
}]
});
$("#jqxbutton").jqxButton({
theme: 'energyblue',
height: 30
});
$("#treeGrid").jqxTreeGrid('checkRow',2);
The last line of code
$("#treeGrid").jqxTreeGrid('checkRow',2); is reason to check the checkbox true while loading.
Please makesure if any help required.Hope it may help.
To check rows on grid ready function use checkRow method, and lockRow will disable editing of the row and give the row gray style.
3 or 8 are Unique ID which identifies the row Id (data field in data source).
ready: function () {
$("#treeGrid").jqxTreeGrid('checkRow', '3');
$("#treeGrid").jqxTreeGrid('lockRow', '3');
$("#treeGrid").jqxTreeGrid('checkRow', '8');
$("#treeGrid").jqxTreeGrid('lockRow', '8');
},
To disable checkboxes you can use rowUncheck event to prevent uncheck by checking the row again.
$('#treeGrid').on('rowUncheck', function (event) {
$("#treeGrid").jqxTreeGrid('checkRow', '3');
$("#treeGrid").jqxTreeGrid('checkRow', '8');
});
$("#treeGrid").jqxTreeGrid({
// ......
});

Add slider to line chart fusion chart

I am using Fusion Chart library for building line chart. I want a slider at the bottom of the chart so values can change when slider is moved back and forth. How can we achieve this in fusion charts ?
Are you looking for a solution like this ? http://jsfiddle.net/subramaniashiva/anrsydf7/
I have used the getJSONData and setJSONData of FusionCharts and updated the line chart based on the value from slider.
FusionCharts.ready(function() {
var chartConfig = {
"caption": "Total footfall in Bakersfield Central - Admin View",
"subCaption": "Year 2014",
"xAxisName": "Month",
"yAxisName": "No. of Visitors",
//Cosmetics
"lineThickness": "2",
"paletteColors": "#0075c2",
"baseFontColor": "#333333",
"baseFont": "Helvetica Neue,Arial",
"captionFontSize": "14",
"subcaptionFontSize": "14",
"subcaptionFontBold": "0",
"showBorder": "0",
"bgColor": "#ffffff",
"showShadow": "0",
"canvasBgColor": "#ffffff",
"canvasBorderAlpha": "0",
"divlineAlpha": "100",
"divlineColor": "#999999",
"divlineThickness": "1",
"divLineIsDashed": "1",
"divLineDashLen": "1",
"divLineGapLen": "1",
"showXAxisLine": "1",
"xAxisLineThickness": "1",
"xAxisLineColor": "#999999",
"showAlternateHGridColor": "0",
"yAxisMinValue": "0",
"yAxisMaxValue": "100",
"animation": "0"
},
chartData = [{
"label": "Jan",
"value": "42"
}, {
"label": "Feb",
"value": "81"
}, {
"label": "Mar",
"value": "36"
}],
revenueChart = new FusionCharts({
type: 'line',
renderAt: 'chart-container',
width: '550',
height: '350',
dataFormat: 'json',
dataSource: {
"chart": chartConfig,
"data": chartData
}
});
revenueChart.render();
document.getElementById('slider').oninput = function() {
var currentData = revenueChart.getJSONData(),
selectedMonth = document.getElementById("monthSelector").selectedIndex;
currentData.data[selectedMonth].value = this.value.toString();
revenueChart.setJSONData(currentData);
};
});