Mango HTML & Javascript Web Interface (7/7/2015)

Today I read through the entire MangoJavascriptAPI-UserGuide in detail.
http://10.14.4.52:8080/modules/dashboards/web/private/MangoJavascriptAPI-UserGuide.pdf
Dashboard Templater
Configuration_________________________________
new DashboardTemplater(configuration);
Data Point Group Configuration___________________
new DataPointGroupConfiguration(config)
config =
{
groupBy: 'Folder',
labelAttribute: 'name',
matchConfigurations:
[{
matchAttribute: 'path',
egex: /Target Folder/
}]
}
Data Point Match Configuration____________________
new DataPointMatchConfiguration(providerId, matchConfigurations, options)
Data Providers_________________________________
Point Value Data Provider________________________
load( options , error )
options =
{
from: Date,
to: Date,
rollup: One of ‘AVERAGE’, ‘FIRST’, ‘LAST’, ‘MINIMUM’, ‘MAXIMUM’, ‘SUM’, ‘COUNT’,
timePeriodType: ‘YEARS’, ‘MONTHS’, ‘WEEKS’, ‘DAYS’, ‘HOURS’, ‘MINUTES’,
timePeriods: Number
}
Realtime Point Value Data Provider_________________
http://10.14.4.52:8080/private-dashboards/pointHierarchyExamples/realtimeSerialChart.shtm
Bar Chart Configuration__________________________
new BarChartConfiguration(‘divId’, [dataProviderIds], AmChartJSON, mangoChartMixins, options)
http://10.14.4.52:8080/private-dashboards/pointHierarchyExamples/barChart.shtm
Because I am creating a static dashboard map interface, I can skip a lot of the complex code inside this API.
I will skip the entire user group, data, and date set, and have all that inside a static configuration Json object.
This will be imported into the dashboard templater, which will be called on load, rather than after a menu select.
That way, all the data I need is already loaded when the page is opened, as the specific data points will not change, they will only be updated.
When the user hovers over the SVG, this only displays the already loaded data.
In order to do this I will be using a bar chart that links to the mango templater.
I am now prototyping at http://10.14.4.52:8080/private-dashboards/test.shtm
However, Mango then crashed with error "RequestError: Unable to load/status/mango.json? time=0 status: 0"
This error persists after restart.
After Dr. Bill fixed it by downgrading his Java version, I began working on creating a bar chart from the Mango data.
I started by looking at their tutorials.
They start by importing all the necessary JavaScript libraries.
They then create the templater with the amchartes inside them.
values to note are the data provider ids and the category fields.
After that, they push entries into the data provider.
Finally, they create the data providers with the point configuration.
They chose to create a menu that the user can select from.
We are not going to do that, as we will only be displaying specific points.
Here is the sample bar chart output:
My next step is to break down this example code so that I can replicate its functionality.

Comments