How to migrate Fusion Widgets XT Gantt Chart from flash to Java Script? - fusioncharts

I have the Fusion Widgets XT in my project to create Gantt Charts. But the charts was built to use flash (As you can see below), and now, i need migrate those charts to use java script. But i didn't find any example about it.
<script type="text/javascript">
if(FusionCharts( "ChartReportId"))
{
FusionCharts("ChartReportId").dispose();
}
var chart = new FusionCharts("http://#{facesContext.externalContext.request.serverName}:#{facesContext.externalContext.request.serverPort}#{facesContext.externalContext.requestContextPath}/resources/Fusion Widgets XT/Enterprise/3.2/Charts/Gantt.swf", "ChartReportId", "100%", "#{controllerParam.ganttHeight}", "0", "1" );
chart.setXMLData("#{controllerParam.xmlData}");
chart.render("chartdiv");
</script>
Could anyone help me?

Try the latest version and you do not need to change anything as JavaScript is the default renderer. if you are using a old version (not sure which one) try setting the renderer to JavaScript by
FusionCharts.setCurrentRenderer("javascript");
Or you can even remove the .swf part and see if anything gets changed. But I highly recommend you to get the latest version. As previous Flash version is now FusionCharts Free.

Related

Loading specific SAPUI5 Business Suite not possible

i have a question, i dont really get it.. because i cant find anything to this..
First of all my UI5 Version 1.71 (there is also no hint if a specific version is required for the icons.)
My problem is, that only some of the business suite icons are displayed or even are loaded..
for example how i get the icons:
const fonts = [{
fontFamily: "BusinessSuiteInAppSymbols",
fontURI: sap.ui.require.toUrl("sap/ushell/themes/base/fonts/")
}];
fonts.forEach(oFont => {
IconPool.registerFont(oFont);
});
it is okay, it will be registerd and some of the icons are available for example (sap-icon://BusinessSuiteInAppSymbols/icon-truck-load)
but anyway some of them are not (sap-icon://BusinessSuiteInAppSymbols/icon-stock-warehouse) i mean why? there is no information about this on the icon page, why this should not displayed or loaded ? or i am blind?
since the page for the icon says there are 338 Icons
but if i check how much items i loaded there are 287, i mean why? i cant find anything related to this
The icons delivered with UI5 depend indeed on the version. Therefore, if you want to check which icon is available for a specific UI5 version you should use the versioned demo kit to get the exact details for the version you are using.
You wrote you are using UI5 version 1.71. If you use now the Icon Explorer URL for SAPUI5 1.71.43 you can see that there are only 300 icons in (and icon-stock-warehouse is not part of it).

Use Chartjs-Annotation-Plugin without using "import"

Is there a way to use the newest version of the chart-annotation-plugion as an inline plugin?
How I currently do it:
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/3.1.0/chart.min.js" ></script>
<script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-annotation#1.0.0-rc/dist/chartjs-plugin-annotation.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/chartjs-plugin-datalabels/2.0.0-beta.1/chartjs-plugin-datalabels.min.js" ></script>
But in newer versions of ChartJS you need to register your plugins, but I dont think the plugin has a global property to register it, like the datalabel plugin (https://chartjs-plugin-datalabels.netlify.app/guide/getting-started.html#installation) has.
Here are the docs for the annotation plugin: https://www.chartjs.org/chartjs-plugin-annotation/guide/integration.html.
Any help is greatly appreciated.
Late to the party but I don't see a response yet and I was also having trouble figuring it out.
Simply include
<script>
Chart.register('chartjs-plugin-annotation');
Chart.register('chartjs-plugin-datalabels');
// ... rest of your code
</script>
somewhere near the top of your scripts after your CDN imports.
As per the Chartjs plugin documentation, this will work with any plugin that follows the naming convention chartjs-plugin-*
Edit:
Adding a working example; credit to #dennis-bauszus for most of the chart layout.
https://codepen.io/jarrilla/pen/OJjMVEo

JasperSoft ReportServer - Visualize.js integration issues

I am testing out the visualize.js integration from jasper reportserver pro edition. It does not work because my application also has its jquery/require modules and visualize.js also tries to load it's own version of jquery/require modules. The overwriting of my frameworks libraries creates many uncertain and unpredictable issues.
Is there a way to tell jaspersoft to not load jquery/require libraries?
Thanks!
You can make use of the jQuery.noConflict() to handle multiple versions of it on the same page. See here
Maybe it is too late now, but in the past we faced with the similar issues, and the solution was to insert this before your script:
<script type="text/javascript">
var j$ = jQuery.noConflict();
</script>
And afterwards in your script, change all $ to the j$
That is what solved our problem with multiple jQuery libraries on the same page. Hope it helps you too.

ejGrid Hidden columns's header does not hide in syncfusion JS

I am using SyncFusion JS ejGrid in my project.
I am facing strange issue.
I am trying to hide Primary Key Colum**n in Grid. Column get hide but It's **Header does not hide.
I am also getting
"TypeError: this.model.currentViewData is null" error constantly.
Please provide me a solution.
Query: Column get hide but It's **Header does not hide
This issue had been reproduced in the Essential Studio v11.4.0.26 and it can be resolved by referring the bootstrap.css before the ej.widgets.all.css in your application. It has not been reproduced in the latest version (12.1.0.49) and hence we suggest you to upgrade to the latest version.
Please find the latest JavaScript studio from the below link.
http://www.syncfusion.com/downloads/jsservicepacks
And also specify the Essential Studio version you are using so that we can analyze your issue and provide solution as early as possible.
Query:TypeError: this.model.currentViewData is null
Please share the code you have tried.

GWT visualization API Motion Chart language

I'm using the gwt visualization library to display motion charts in a gwt app. However, the language shown in the chart is random (different language every time it loads).
This:
http://code.google.com/apis/visualization/documentation/using_overview.html#localization
says I can set it, but only through the load method. But the GWT load method does not allow me to set anything other than the version and Packages.
As far as I can tell, there is no way of explicitly setting the language using the GWT API.
Any ideas?
You can set the locale of a GWT application in many ways: Locales in GWT. My guess would be that the Visualization API uses that value to set its own locale value.
You should be able to do a quick test of this by appending locale=fr (change to your desired locale) to the address:
http://www.example.com/MyGwtApp.html?locale=fr
This will force that locale to be used by GWT.
Update: the AjaxLoader does support setting the language via the AjaxLoader.AjaxLoaderOptions:
AjaxLoaderOptions options = AjaxLoaderOptions.newInstance();
options.setLanguage("fr");
AjaxLoader.loadApi("visualization", "1", null, options);
I'm not sure you can use null for the callback parameter, but you get the general idea.
I've discovered that this is a bug, which I've submitted here:
http://code.google.com/p/gwt-google-apis/issues/detail?id=358