babuu
-
Content count
25 -
Joined
-
Last visited
Posts posted by babuu
-
-
Please help on this
Hi Team,
How to javascript click evet in legend of PIE CHAR?
Please help me.
Thanks
Babu
-
Hi Team,
How to javascript click evet in legend of PIE CHAR?
Please help me.
Thanks
Babu
-
Thank you very much for response.
port:8088 worked on php site for "http://localhost:8088/export/charts/index.php" ,This url used in xml for exporting images.
java application Url..
http://localhost/app...oye_profile.jsp.
thanks
babu
Hey,
Form the attached screenshot of your previous reply, it seems that your server is running on port: 8088 and you are not providing this port number in your local URL.
Could you please confirm once, if "employe_profile.jsp" page is accessible using the URL http://localhost/app...oye_profile.jsp in the browser ?
Awaiting your response!
-
header("Location: http://localhost/app/employe_profile.jsp"); //This is local url
Hi,
Could you confirm, how you are providing the URL to the "header()" function in your "index.php" page?
Please note that you need to provide HTTP mapping relative URL of your redirected page in index.php page.
Ref. Code:
header("Location: http://localhost:8088/export/sample.html"); //Assuming your main page (sample.html) is inside "export" folder of your application
Awaiting your feedback.
-
Thanks for reply.
I have used header() in php but page refreshed while click download button.
when click download button,we are able saving images in local path but struct at php site.
Please find attachment for reference.
Thanks
Babu
Hi,
The "header()" is redirecting me to the the previous chart page and the refresh functionality is working fine while click download button, from our end.
Could you please elaborate a bit more on your requirement and explain a bit on "I am implemented header but refreshed page because java application through call php site (export images), here urls dynamically changing." ?
Awaiting your response.
-
Hi,
We are implementing fusion charts exporting images by usingSVG Rasterizer (batik-rasterizer).
We are deployed php site in LINUX, we are accessed filesfrom php site so working fine.
We have facing problem "Error while convertingSVG"
We have done with below commands in linux.
1. java -jar batik-rasterizer.jar
2. java -jar batik-rasterizer.jar samples/batikFX.svg
3. java -jar batik-rasterizer.jar -d babu -m image/jpegsamples/*.svg
Above commands run in windows,its working fine.
In Linux not working converting svg.
Is it working"batik-rasterizer" in LINUX?
Please help on this.
-
Hey,
Please clear cache for all browsers.
Earlier i got this error.
Thanks
ALL .js files are in dir as required.
I don't want to FORCE JS charts . . . this will run on iPad AND desktop.
When I force JS charts as specified . . . does not work on desktop, either.
-
Hey,
Please check it once (MSCombiDY2D.swf).
http://docs.fusioncharts.com/charts/contents/guide-for-web-developers/csnet/CS_BasicExample.html
thanks
babu
Hi,
There's a problem with Dual Y in my chart.
Now I have a chart using MSSPline.swf but wish Dual Y to display the data.
After refering to the documentation , it seems only combination charts provide Dual Y .
Is there any other solution (for example set some attribute) for this problem?
regards
-
Hey
Please active line FusionCharts.setCurrentRenderer('JavaScript'); in code ,if use javascript chart (without flash) of latest version works fine.
Thanks
Babu
Code below works fine on desktop . . . but not on iPad.
I can create simple HTML (like your weekly sales example) and it works. But this does not. XML is "well-formed", confirmed in a number of editors and in browser window.
The DIVs below are selected via a multi-select . . . "Report->Product" producing two graphs (the "overall" and one constituent).
<div id="GraphProduct">
<!-- CREDIT LOSS -->
<div id="CA1" style="" class="graphproductdiv">
<span id="report">Report</span>
<span id="product">Product</span>
<script type="text/javascript">
// FusionCharts.setCurrentRenderer('JavaScript');
//FusionCharts._fallbackJSChartWhenNoFlash();
var myProduct = FusionCharts.render("./FusionCharts/MSLine.swf",
"myProductId", "480", "360", "report", "./App_Files/dataCL_M<%=ModuleIndex%>_<%=SessionKey%>_<%=RoundSuffix%>.xml");
var myReport = FusionCharts.render("./FusionCharts/MSLine.swf",
"myReportId", "480", "360", "product", "./App_Files/dataCL_Unsecured_M<%=ModuleIndex%>_<%=SessionKey%>_<%=RoundSuffix%>.xml");
</script>
</div>
<div id="CA2" class="graphproductdiv">
<span id="span1">Report</span>
<span id="span2">Product</span>
<script type="text/javascript">
var myProduct = FusionCharts.render("./FusionCharts/MSLine.swf",
"myProductId", "480", "360", "span1", "./App_Files/dataCL_M<%=ModuleIndex%>_<%=SessionKey%>_<%=RoundSuffix%>.xml");
var myReport = FusionCharts.render("./FusionCharts/MSLine.swf",
"myReportId", "480", "360", "span2", "./App_Files/dataCL_Secured_M<%=ModuleIndex%>_<%=SessionKey%>_<%=RoundSuffix%>.xml");
</script>
</div>
-
Thanks for response.
Please give me your mailid, i am sending sample app to ur mail .
Thanks
Babu
Hi,
Please find the response to your queries inline, below:
1.we have implemented exporting images in our application by using php(Highcharts).Here one problem facing how to controling php site after saving images in localpath,its going php site how to solve this.
>>I am afraid, we are not able to replicate the issue. After downloading the JavaScript Chart image, it redirects to the same page.
Please check the sample (below provided URL) and do share the feedback with us.
http://docs.fusionch...criptChart.html
2.what is diffrent between SetDataXML and setDataURL?
>>
setDataXML(); // This function provides data to the chart in form of XML String.
setDataURL(); // This function specifies the URL of the XML data source.
But, we recommend to not to use these functions as these are deprecated functions and due to backward compatibility they still work.
So, please use setXMLUrl(url) instead of setDataURL(url) and setXMLData(data) instead of setDataXML(data).
Hope this helps!
Awaiting your response.
-
Hi,
We are used pure javascript fusion charts(without flash).Working fine. we are using latest of fusioncharts.
1.we have implemented exporting images in our application by using php(Highcharts).Here one problem facing how to controling php site after saving images in localpath,its going php site how to solve this.
2.what is diffrent between SetDataXML and setDataURL?
Problems are below please check it.Please help on these.
Here we are observered.
setDataXML-- one fired DrawComplete while click buuton. See once below code
FusionCharts.setCurrentRenderer('JavaScript');
var myChart = new FusionCharts(path, "myChart123", width, height,'0', '1');
myChart.setDataXML(xml.join(""));
myChart.render(divId);
FusionCharts("myChart123").addEventListener ("DrawComplete" , myChartListener );
};
setDataURL-- everytime fired DrawComplete while click buuton.
FusionCharts.setCurrentRenderer('JavaScript');
var myChart = new FusionCharts(path, "myChart123", width, height,'0', '1');
myChart.setDataURL("/app/p4p/sample.xml");
myChart.render(divId);
FusionCharts("myChart123").addEventListener ("DrawComplete" , myChartListener );
};
Please help me.
Thanks
Babu
-
Please suggest any one...
Please help on this.
-
Hey muralikanth,
Could u provide sample for that.
Thanks
babu
Hi,
Displaying data on the pie slices is not possible.
-
Please help on this.
Hi,
Page not refreshed while click download button.
Please help me.
-
Hey,
Added Listener while rendering.find below code .
function myChartListener(eventObject, argumentsObject) {
/// add code for popup
}
/// render code
FusionCharts.setCurrentRenderer('JavaScript');
var chartId = "ChartId"+ Math.floor(Math.random() * (new Date()).getTime() + 1);
var chiefExecutiveChart = new FusionCharts(path, chartId, width,height,'0', '1');
chiefExecutiveChart.setDataXML(xml.join(""));
chiefExecutiveChart.render(divId);
FusionCharts(chartId).addEventListener("click",
myChartListener);
thanks
babu
Hi...
how to open new popup window when click pie chart using java script....
-
Hi,
Page not refreshed while click download button.
Please help me.
Page not refreshed while click download button.
Please advice.
-
Page not refreshed while click download button.
Please advice.
Thank you very much for replay.
I am implemented header but refreshed page because java application through call php site (export images), here urls dynamically changing.
Please advice..
-
Thank you very much for replay.
I am implemented header but refreshed page because java application through call php site (export images), here urls dynamically changing.
Please advice..
Hi,
With regard to your query, please add the current page URL as a raw HTTP header using PHP function "header();".
Ref. Code snippet of index.php:
// delete it unlink("babu/$tempName.svg"); unlink($outfile); header("Location: http://www.currentPage.php"); //Set your current page URL here // SVG can be streamed directly back } else if ($ext == 'svg') { //header("Content-Disposition: attachment; filename=$filename.$ext"); //header("Content-Type: $type"); //echo $svg; file_put_contents("D:/sample/$tempName.$ext", $svg); } else { echo "Invalid type"; } ?>
Hope this helps!
-
Please help on this
Hi,
we have done exporting images from php code(sample app configured in wamp server for saving image in local path) by using pure javascript (without flash).
we have problem with redirect php site while downloading images.Need to be page itself. Dont go php site.
How to solve this redirect problem?
Please check it once below php code for saving image in local path.
<?php
/**
* This file is part of the exporting module for Highcharts JS.
* www.highcharts.com/license
*
*
* Available POST variables:
*
* filename string The desired filename without extension
* tempName string The name of the file that get stored in the server temporary location
* type string The MIME type for export.
* width int The pixel width of the exported raster image. The height is calculated.
* svg string The SVG source code to convert.
*/
// Options
define ('BATIK_PATH', 'batik-rasterizer.jar');
///////////////////////////////////////////////////////////////////////////////
ini_set('magic_quotes_gpc', 'off');
$type = $_POST['type'];
$svg = (string) $_POST['svg'];
$filename = (string) $_POST['filename'];
// prepare variables
if (!$filename) $filename = 'chart';
if (get_magic_quotes_gpc()) {
$svg = stripslashes($svg);
}
$tempName = md5(rand());
// allow no other than predefined types
if ($type == 'image/png') {
$typeString = '-m image/png';
$ext = 'png';
} elseif ($type == 'image/jpeg') {
$typeString = '-m image/jpeg';
$ext = 'jpg';
} elseif ($type == 'application/pdf') {
$typeString = '-m application/pdf';
$ext = 'pdf';
} elseif ($type == 'image/svg+xml') {
$ext = 'svg';
}
$outfile = "babu/$tempName.$ext";
if (isset($typeString)) {
// size
if ($_POST['width']) {
$width = (int)$_POST['width'];
if ($width) $width = "-w $width";
}
// generate the temporary file
if (!file_put_contents("babu/$tempName.svg", $svg)) {
die("Couldn't create temporary file. Check that the directory permissions for
the /temp directory are set to 777.");
}
// do the conversion
$output = shell_exec("java -jar ". BATIK_PATH ." $typeString -d $outfile $width babu/$tempName.svg");
// catch error
if (!is_file($outfile) || filesize($outfile) < 10) {
echo "<pre>$output</pre>";
echo "Error while converting SVG for menlo.....";
}
// stream it
else {
//header("Content-Disposition: attachment; filename=$filename.$ext");
//header("Content-Type: $type");
//echo file_get_contents($outfile);
//echo $_SERVER['SERVER_NAME'];
//echo $_SERVER['REQUEST_URI'];exit;
file_put_contents("D:/sample/$tempName.$ext", file_get_contents($outfile));
}
// delete it
unlink("babu/$tempName.svg");
unlink($outfile);
// SVG can be streamed directly back
} else if ($ext == 'svg') {
//header("Content-Disposition: attachment; filename=$filename.$ext");
//header("Content-Type: $type");
//echo $svg;
file_put_contents("D:/sample/$tempName.$ext", $svg);
} else {
echo "Invalid type";
}
?>
--------------------------------------------------------------------------------------------------
xml file
--------
<chart caption='Monthly Revenue' xAxisName='Month' yAxisName='Revenue'
numberPrefix=' showValues='0' exportAtClient="0"
html5ExportHandler="http://localhost:8088/export/charts/index.php"
exportEnabled='1' exportAction='save' exportShowMenuItem='1' exportCallback="FC_Exported">
<set label='Jan' value='420000' />
<set label='Feb' value='910000' />
<set label='Mar' value='720000' />
<set label='Apr' value='550000' />
<set label='May' value='810000' />
<set label='Jun' value='510000' />
<set label='Jul' value='680000' />
</chart>
chart render code
-----------------
FusionCharts.setCurrentRenderer('JavaScript');
var myChart = new FusionCharts( "charts/Column2D.swf", "myChartId", "300", "300", "0", "1" );
myChart.setDataURL("charts/Data.xml");
myChart.render("chartContainer");
Click download button
----------------
var chartObject1 = getChartFromId('myChartId');
if( chartObject1.hasRendered() ) {
chartObject1.exportChart();
}
Thanks
Babu
-
Hi,
we have done exporting images from php code(sample app configured in wamp server for saving image in local path) by using pure javascript (without flash).
we have problem with redirect php site while downloading images.Need to be page itself. Dont go php site.
How to solve this redirect problem?
Please check it once below php code for saving image in local path.
<?php
/**
* This file is part of the exporting module for Highcharts JS.
* www.highcharts.com/license
*
*
* Available POST variables:
*
* filename string The desired filename without extension
* tempName string The name of the file that get stored in the server temporary location
* type string The MIME type for export.
* width int The pixel width of the exported raster image. The height is calculated.
* svg string The SVG source code to convert.
*/
// Options
define ('BATIK_PATH', 'batik-rasterizer.jar');
///////////////////////////////////////////////////////////////////////////////
ini_set('magic_quotes_gpc', 'off');
$type = $_POST['type'];
$svg = (string) $_POST['svg'];
$filename = (string) $_POST['filename'];
// prepare variables
if (!$filename) $filename = 'chart';
if (get_magic_quotes_gpc()) {
$svg = stripslashes($svg);
}
$tempName = md5(rand());
// allow no other than predefined types
if ($type == 'image/png') {
$typeString = '-m image/png';
$ext = 'png';
} elseif ($type == 'image/jpeg') {
$typeString = '-m image/jpeg';
$ext = 'jpg';
} elseif ($type == 'application/pdf') {
$typeString = '-m application/pdf';
$ext = 'pdf';
} elseif ($type == 'image/svg+xml') {
$ext = 'svg';
}
$outfile = "babu/$tempName.$ext";
if (isset($typeString)) {
// size
if ($_POST['width']) {
$width = (int)$_POST['width'];
if ($width) $width = "-w $width";
}
// generate the temporary file
if (!file_put_contents("babu/$tempName.svg", $svg)) {
die("Couldn't create temporary file. Check that the directory permissions for
the /temp directory are set to 777.");
}
// do the conversion
$output = shell_exec("java -jar ". BATIK_PATH ." $typeString -d $outfile $width babu/$tempName.svg");
// catch error
if (!is_file($outfile) || filesize($outfile) < 10) {
echo "<pre>$output</pre>";
echo "Error while converting SVG for menlo.....";
}
// stream it
else {
//header("Content-Disposition: attachment; filename=$filename.$ext");
//header("Content-Type: $type");
//echo file_get_contents($outfile);
//echo $_SERVER['SERVER_NAME'];
//echo $_SERVER['REQUEST_URI'];exit;
file_put_contents("D:/sample/$tempName.$ext", file_get_contents($outfile));
}
// delete it
unlink("babu/$tempName.svg");
unlink($outfile);
// SVG can be streamed directly back
} else if ($ext == 'svg') {
//header("Content-Disposition: attachment; filename=$filename.$ext");
//header("Content-Type: $type");
//echo $svg;
file_put_contents("D:/sample/$tempName.$ext", $svg);
} else {
echo "Invalid type";
}
?>
--------------------------------------------------------------------------------------------------
xml file
--------
<chart caption='Monthly Revenue' xAxisName='Month' yAxisName='Revenue'
numberPrefix=' showValues='0' exportAtClient="0"
html5ExportHandler="http://localhost:8088/export/charts/index.php"
exportEnabled='1' exportAction='save' exportShowMenuItem='1' exportCallback="FC_Exported">
<set label='Jan' value='420000' />
<set label='Feb' value='910000' />
<set label='Mar' value='720000' />
<set label='Apr' value='550000' />
<set label='May' value='810000' />
<set label='Jun' value='510000' />
<set label='Jul' value='680000' />
</chart>
chart render code
-----------------
FusionCharts.setCurrentRenderer('JavaScript');
var myChart = new FusionCharts( "charts/Column2D.swf", "myChartId", "300", "300", "0", "1" );
myChart.setDataURL("charts/Data.xml");
myChart.render("chartContainer");
Click download button
----------------
var chartObject1 = getChartFromId('myChartId');
if( chartObject1.hasRendered() ) {
chartObject1.exportChart();
}
Thanks
Babu
-
Thank you for response.
Hey Babu,
Thank you for all inputs.
Many browsers restrict JavaScript from accessing local file system owing to security reasons. The JavaScript charts, when running locally, will not be able to access data provided using setXMLUrl function. If you run the files from a server, it will run absolutely fine, though. When running locally, however, if you use setXMLData function , it works fine.
Hope this helps.
-
Sorry forgot chart type,
Column2D.swf
Thanks for reply ,
1. Version fusioncharts/3.2.3-sr3.5347
2.
<script type="text/javascript">
FusionCharts.setCurrentRenderer('JavaScript');
var myChart = new FusionCharts( "charts/Column2D.swf", "myChartId", "300", "300", "0", "1" );
myChart.setXMLUrl("charts/Data.xml");
myChart.render("chartContainer");
-->
</script>
3. (chart XML)
<chart caption='Monthly Revenue' xAxisName='Month' yAxisName='Revenue'
numberPrefix=' showValues='0' exportAtClient="0"
html5ExportHandler="http://localhost/export/charts/index.php"
exportEnabled='1' exportAction='save' exportShowMenuItem='1'>
<set label='Jan' value='420000' />
<set label='Feb' value='910000' />
<set label='Mar' value='720000' />
<set label='Apr' value='550000' />
<set label='May' value='810000' />
<set label='Jun' value='510000' />
<set label='Jul' value='680000' />
</chart>
Please check above details as per asked.
Thanks
Babu
-
Thanks for reply ,
1. Version fusioncharts/3.2.3-sr3.5347
2.
<script type="text/javascript">
FusionCharts.setCurrentRenderer('JavaScript');
var myChart = new FusionCharts( "charts/Column2D.swf", "myChartId", "300", "300", "0", "1" );
myChart.setXMLUrl("charts/Data.xml");
myChart.render("chartContainer");
-->
</script>
3. (chart XML)
<chart caption='Monthly Revenue' xAxisName='Month' yAxisName='Revenue'
numberPrefix=' showValues='0' exportAtClient="0"
html5ExportHandler="http://localhost/export/charts/index.php"
exportEnabled='1' exportAction='save' exportShowMenuItem='1'>
<set label='Jan' value='420000' />
<set label='Feb' value='910000' />
<set label='Mar' value='720000' />
<set label='Apr' value='550000' />
<set label='May' value='810000' />
<set label='Jun' value='510000' />
<set label='Jul' value='680000' />
</chart>
Please check above details as per asked.
Thanks
Babu
Hi,
Please send us the information on following points:
> What FusionCharts version are you using?
> Send us the sample code to replicate the issue at our end.
> What chart type used? Send us the chart XML also.
-
Hi all,
I am working on pure javascript fusion charts for all browsers.
FF and IE Working fine but Chrome not working
I am getting this error in chrome.
XMLHttpRequest cannot load file:///C:/wamp/www/export/charts/Data.xml. Origin null is not allowed by Access-Control-Allow-Origin.
Could any help....
Click Event Supported Lengend
in FusionCharts and PHP
Posted · Report reply
Please help me......