Commit da3c0c7a authored by Kevin Yumang's avatar Kevin Yumang

SERV-2286 - link chart data manager object attributes with javascript chart initialization WIP

parent bc0d7791
......@@ -53,7 +53,7 @@ function init_chart(chartId) {
}
}
// setting the data first checks for the data chart manager object and if not set then will use the chart element parameters. else defaults.
// setting the data first checks for the data chart manager object and if specific attributes are not set then will use the chart element parameters. else defaults.
function set_data(objectData, elementObject, numberOfCharts, callback) {
setTimeout(function() {
......@@ -66,8 +66,6 @@ function set_data(objectData, elementObject, numberOfCharts, callback) {
'#66bb6a'
];
console.log(objectData);
let options;
let rawData = objectData?.rawData ?? (elementObject.attr('raw') ? JSON.parse(elementObject.attr('raw')) : null);
......@@ -161,8 +159,9 @@ function set_chart_height(numberOfCharts, chartElement) {
function setSeries(seriesData, elementObject, objectData) {
// setting the data first checks for the data chart manager object and if not set then will use the chart element parameters. else defaults.
// uses series options if available else use global options.
// setting the data first checks for the data chart manager object and if specific attributes are not set then will use the chart element parameters. else defaults.
// uses series options if available else use chart manager or chart parameter settings
let seriesArray = [];
if(!seriesData || seriesData.length == 0) return [];
......
......@@ -37,6 +37,7 @@
// if data manager object is used, should only pass the main object to the chart parameter 'data'
// automatically detects if the chart is multiple by number of unique indexes.
// setting the data first checks for the data chart manager object and if specific attributes are not set then will use the chart element parameters. else defaults.
// sample backend data
$categories = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'July', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment