Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7308303
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T23:32:20+00:00 2026-05-28T23:32:20+00:00

I am using JS Charts to draw ‘bar’ chart and I don’t know how

  • 0

I am using JS Charts to draw ‘bar’ chart and I don’t know how to build the XML file data with data collected from the DataBase?

This is how I prepare XML data but It doesn’t work, could you please help me?

<SCRIPT>var strXML = <JSChart><dataset type='bar'><data unit='Delivered' value='29/><data unit='Pending' value='9/><data unit='Rejected' value='6/><data unit='Unknown' value='/></dataset><colorset>
<color value='#7979DB'/>
<color value='#7952E9'/>
<color value='#792BC8'/>
<color value='#792BA1'/>
</colorset><optionset>
<option set='setAxisValuesColo' value= '#008'/>
<option set='setAxisColor' value='#ABABAB'/>
<option set='setAxisWidth' value='1'/>
<option set='setAxisValuesColor' value='#858585'/>
<option set='setAxisNameColor' value='#858585'/>
<option set='setBarBorderColor' value='#bbb'/>
<option set='setBarOpacity' value='0.8'/>
<option set='setBarSpacingRatio' value='50'/>
<option set='setBarValues' value='false'/>
<option set='setTitleColor' value='#928888'/>
<option set='setGridColor' value='#ABABAB'/>
</optionset></JSChart>;</SCRIPT>
<script type="text/javascript" src="/image/mobiletool/calander/js/jscharts.js"></script>
<div id="graph">Loading graph...</div>
<script type="text/javascript">
var myChart = new JSChart('graph', 'bar');
myChart.setDataXML(strXML);
myChart.draw();
</script>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T23:32:20+00:00Added an answer on May 28, 2026 at 11:32 pm

    It looks to me like you are creating the XML in PHP but not passing it over to JS. You effectively need to echo out your $strXML for JS to be able to use it. Something along the lines of this:

    echo "<SCRIPT>";
    echo "var strXML = \"". $strXML ."\";";
    echo "</SCRIPT>";
    

    If you echo out this before your JS then you just need to change:

    myChart.setDataXML('$strXML');
    

    to

    myChart.setDataXML(strXML);
    

    Give it a try.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using nevron(c#) to draw bar charts. However, the printed chart is quite
I am using excel to draw charts from c#, but i need the chart
I'm using flot api to draw charts. Look at this chart type HERE .
We are using Google Charts for render the chart images, but 500 requests/day became
I'm using the Google charts API to generate a pie chart in my Rails
ExtJS Charts, I am using an Ext column chart and I want to implement
I'm using cairo plot to draw charts with python. I followed the instruction as
Im using opensource library called wxFreeChart to draw some XY charts. In example there
I am trying to set Google Chart using API generated from below link Google
I've got a windows app which draws charts from data points but there is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.