MX Dynamic Charts Forum :: Please Help ..

This thread was displayed: 260 times

Starting with 17th May 2007, Adobe Systems will stop offering support for any version of the discontinued InterAKT products. As a result, we will not answer to new support incidents starting with May 17th, 2007. Pending support incidents will still be followed in order to be closed. The product forums will remain open and be transformed in user-to-user forums. The general forums will be made read-only and not allow new posts or comments.

For more information about the affected products visit: www.interaktonline.com/Support/


View All View Non Threaded Newest first
  • 08-28-2006 22:37:59 GMT +2 Leif Bohlin

    Hi there,

    I just bought a copy of MX Dynamic Charts and setup a test page at http://www.angered.net/chartweb/chart.php

    The thing is that it displays the numbers 0 1 1 2 3 3 4 5 5 6 in the actual amount of total members when it should display just 0 1 2 3 because there is only 3 members in the database table. Why?

    The chart orders by "id" field because it gets its values from that field and I have created a field called "chart" to have set as label field but there is nothing in that field because I did not want any labels.

    Please help me out here, I just can not figure out why it is duplicate values AND values up to 6 when it is only 3 members in that table.

    I double checked this in the mySQL database.


    Sincerely,

    Leif Bohlin
    leif.bohlin@gmail.com

    • 08-29-2006 02:12:51 GMT +2 Leif Bohlin


      Hi again,

      I have now straighten it out BUT it shows the sum of the 3 combined id numbers and I want it to show total numbers of id´s.

      The numbers shown in the picture should be 0 1 2 3 and not 189 because that is the number of the total if you ad 62+63+64 that is the id numbers.

      So how do I get it to show 0 1 2 3?

      Here is the sql statement:

      ------------

      $query_Recordset1 = "SELECT * FROM jos_users";
      $Recordset1 = mysql_query($query_Recordset1, $PC) or die(mysql_error());
      $row_Recordset1 = mysql_fetch_assoc($Recordset1);
      $totalRows_Recordset1 = mysql_num_rows($Recordset1);

      $Chart_1 = new MX_Chart();
           $Chart_1->setRelativePath("");
           $Chart_1->setChartType("Bar", 120, 150);
           $Chart_1->setDataRange($Recordset1, "chart", "id", "Normal", "");
           $Chart_1->setSort("Labels", "ASC");
           $Chart_1->setChartTitle("TMC");

      -----------

      Please help me out cause I do not have any php to mysql knowledge.


      Sincerely,

      Leif Bohlin


      • 08-30-2006 10:46:43 GMT +2 Razvan Racasanu [InterAKT]Adobe Systems Romania staff
        Hello, If I understand corr... View more

        Hello,

        If I understand correctly you want to display the number of records the recordset returns. To do this, you will have to modify the recordset like this:

        SELECT COUNT(*) AS values, 'Label' AS label FROM jos_users

        Then, in the MX Charts, you must select the field values and label.

        Regards,
        Razvan RACASANU

        • 08-30-2006 13:20:39 GMT +2 Leif Bohlin
          Hi there Razvan, Ok, could yo... View more

          Hi there Razvan,

          Ok, could you please paste it in my code and show me where to set the | SELECT COUNT(*) AS values, 'Label' AS label FROM jos_users | because I have no clue what you are talking about.

          I am a newbie when it comes to sql strings.


          Sincerely,

          Leif Bohlin

          .

          • 08-31-2006 10:20:56 GMT +2 Razvan Racasanu [InterAKT]Adobe Systems Romania staff
            Hello, Instead of the line:... View more

            Hello,

            Instead of the line:

            $query_Recordset1 = "SELECT * FROM jos_users";

            you should have the line:

            $query_Recordset1 = "SELECT COUNT(*) AS values, 'Label' AS label FROM jos_users";

            Then, you should edit the MX Charts SB to reselect the field (values and label) from the interface.

            Regards,
            Razvan RACASANU

MX Dynamic Charts 1.1.0
© Adobe Systems Romania. All rights reserved.