In version 8.0, one of the new platform features is an integrated charts package.
Charts come as a bundle of widgets, which provide a graphical way to display data.
They are especially useful for visualizing big sets of data, allowing users to more easily understand and extract information from them. Additionally, charts help remove clutter and make apps look great!
These widgets deliver an API that allows for plotting charts rendered by the Highcharts JavaScript library, and work seamlessly across PC and mobile devices.
So, once you have decided charts are a good addition to your applications, here are some helpful pointers on how to use them:
1. Reference the charts library. Charts are already included in new applications, however you need to reference them on existing ones. Widgets are then available from the Charts eSpace.
4. Gather data and feed it to the chart. SourceDataPointList is the only mandatory parameter, consisting of a single DataPoint record list. The DataPoint structure represents an element to be plotted, and is included in Charts eSpace.
StackingType determines how to stack multiple series in the chart, and is applicable to bar, column and area charts;
LegendPosition controls the position and visibility of the data series’ legend;
XAxisFormat and YAxisFormat configure the X and Y axis, respectively;
ChartFormat handles overall chart configurations.
All charts share this same API, from which only pie chart differs by not having axises. On the academy, we have a video detailing the usage of this API.
6. For a richer experience, enable interactivity with your charts. In order to do this, change the Clickable parameter and provide a target action to be executed when users click on data.
7. Fine-tune it. Since the API focuses on the most common options, sometimes you might need that extra setting. In order to do this, AdvancedFormat lets you write Highcharts JavaScript code for customizing the chart. Available configurations are detailed in Highcharts API, which is very complete and has plenty of examples.
Finally, because an example is worth a thousand words, two eSpaces containing several charts used in NextStep’s presentations follow attached.
We hope you find this post useful, and like the new chart widgets as much as we enjoyed developing them!
Sincerely,
Diogo Serra
$( document ).ready(function() { var chart = $('#" + ourChart.Id + " .OSChart').highcharts(); chart.addAxis({ // Secondary yAxis title: { text: '' }, opposite: true }) chart.series[0].update({yAxis: 0, type: 'column'}) chart.series[1].update({yAxis: 1,type: 'column'}) })
AdvancedFormat_Init(DataPointFormats:,DataSeriesFormats:dataSeriesFormatList,XAxisJSON:,YAxisJSON:,HighchartsJSON:highChartsJSON)
dataSeriesFormat.AdvancedDataSeriesFormat.DataSeriesName = "First series name" dataSeriesFormat.AdvancedDataSeriesFormat.DataSeriesJSON = "yAxis: 0"
dataSeriesFormat.AdvancedDataSeriesFormat.DataSeriesName = "Second series name" dataSeriesFormat.AdvancedDataSeriesFormat.DataSeriesJSON = "yAxis: 1"
highChartsJSON = "yAxis: [{ title: {text: 'First series unit'}, min: 0 }, { title: {text: 'Second series unit'}, opposite: true, min: 0 }]"
Hi, I am not a big JavaScript adept, but I am trying to implement the heatmap graph in my own application.The values used in this example are static (monday, tuesday, wednesday, thursday, friday).These values are declared in JS the folowing way:
SyntaxEditor Code Snippet
yAxis: { categories: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'], title: null },
For my application, the values come from an aggregate and I read it in a Text local variable.The value in the text local variable is: "'T1,21', 'T1,12', 'T1,08', 'T1,03', 'T1,25', 'T2,31'".
My problem is to replace the hard coded categories (monday till friday) with the content in the local variable.
Hi Wout,
You replied to a topic that's over 5 years old, the last post being almost 3 years old. I would advise you to not post to such old topics, but instead create a new one and if needed refer to the old one. In that way your post will attract more attention and will have a bigger chance of being answered.
As for your post above, note that what you've shown is not JavaScript (as that's not needed for using the charts) but JSON, which is something different (even though it has "JavaScript" in its name). As for your specific question, I'm not sure why you would want to do that. The categories on the axis are taken from the Label value of the Datapoint, did you fill those properly?