Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Tools for Java
 QCSPCChart SPC for Java
 SPC Chart in web application

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
ajaypowral Posted - 21 Aug 2015 : 17:08:56
Hi, I am testing SPC Chart control (JavaScript) in my web application. I have some questions -
- How do I render chart in a specific div or iframe
- Is it possible to render multiple chart in same web page
- Is there any example of .Net code or API which I can use to convert my datatable into JSON String required by the chart

Thanks for the response.

Regards
Ajay
6   L A T E S T    R E P L I E S    (Newest First)
ajaypowral Posted - 26 Jul 2016 : 12:48:28
thanks, my apologies I didn't notice that. Thank you, it works fine.
quinncurtis Posted - 26 Jul 2016 : 12:04:02
Your code for the HTML button is wrong. It should look like:

<INPUT TYPE="button" NAME="displayChart" VALUE="Display Chart" onClick="CreateDivChart();">

Because it was wrong, the CreateDivChart method was never assigned to the onClick event, and therefore never called. You can identify these types of errors by using a debugger on the code in your HTML page.


<!doctype html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="QCSPCChartGWT.css">
<script src="chartdefSimple.js"></script>
<script>
function CreateDivChart( )
{
var s = JSON.stringify(TimeXBarR,undefined,2);
pushJSONChartCreateDiv(s, "cc");

}
</script>
<script type="text/javascript" language="javascript" src="qcspcchartgwt/qcspcchartgwt.nocache.js"></script>
</head>
<body>

This is a test page.
<INPUT TYPE="button" NAME="displayChart" VALUE="Display Chart" onClick="CreateDivChart();">

<div id="cc"></div>
</body>
</html>
ajaypowral Posted - 26 Jul 2016 : 09:32:15
thanks for your response. To test pushJSONChartCreateDiv function, I modified spcsimple.html page as follows -
<!doctype html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="QCSPCChartGWT.css">
<script src="chartdefSimple.js"></script>
<script>
function CreateDivChart( )
{
var s = JSON.stringify(TimeXBarR,undefined,2);
pushJSONChartCreateDiv(s, "cc");

}
</script>
<script type="text/javascript" language="javascript" src="qcspcchartgwt/qcspcchartgwt.nocache.js"></script>
</head>
<body>
This is a test page.
<INPUT TYPE="button" NAME="displayChart" VALUE="Display Chart " CreateDivChart();">
<div id="cc"></div>
</body>
</html>

But it doesn't render chart. I also tried iFrame (not sure if that works) instead of Div but it doesn't work either.
quinncurtis Posted - 25 Jul 2016 : 11:33:50
The added JNSI method, which should be present in what you have, is pushJSONChartCreateDiv with a prototype of

public void pushJSONChartCreateDiv(String jsonstring, String domelement)

Assuming you have a div defined somewhere in the web page with a ID of contentContainer:

<div id="contentContainer">
</div>

You can force the chart into the div using pushJSONChartCreateDiv

function processClick( )
{

var s = JSON.stringify(TimeXBarR,undefined,2);

<!-- pushDisplayJSONScript(s); -->

pushJSONChartCreateDiv(s, "contentContainer");

}

You cannot have multiple div and place a chart in each. There is still the restriction of one chart per HTML page.
ajaypowral Posted - 25 Jul 2016 : 10:28:38
Hello, I am opening this topic again,

How do I render chart in a specific div or iframe ?
Adding the chart to an specific html div block is not part of the standard package at this time. We did however add it for a client. Should you purchase the software we can provide you with that. If you want to use it within an iframe, just create an HTML page with nothing but the base QCSPCChart in it. Then reference that html page in an iframe in your master html page.

Referring to your response (listed above), I am working with Schneider-Electric, USA to implement SPC Chart for a client. As you mentioned above you can help us in rendering chart in a specific iFrame on an existing HTML page if we purchase the software. So, we have purchased it now, and would need your help in implementing this requirement.

quinncurtis Posted - 22 Aug 2015 : 16:23:21
How do I render chart in a specific div or iframe ?
Adding the chart to an specific html div block is not part of the standard package at this time. We did however add it for a client. Should you purchase the software we can provide you with that. If you want to use it within an iframe, just create an HTML page with nothing but the base QCSPCChart in it. Then reference that html page in an iframe in your master html page.

Is it possible to render multiple chart in same web page ?
One of out standard SPC Charts can have up to 4 graphs in them: the Primary Chart (XBar for example), Secondary Chart (Range) and a Histogram chart for each. But that is all that you get. You can't add more than one of the 4-graph SPC Charts to a single page. The exception to that is if you place each SPC Chart in its own HTML page, and then include each charts HTML page in your own master HTML page using iframe.

Is there any example of .Net code or API which I can use to convert my datatable into JSON String required by the chart ?
We don't have any examples other than what's in the manual under sectin Dynamic Creation of JSON (Chapter 1), and the examples found under the Javascript, jQuery, Ajax and PHP section of Chapter 20. You can always hire us to do a custom example for your exact situation.

Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07