Jump to content


Three Problems


  • Please log in to reply
4 replies to this topic

#1 Harm Millaard

Harm Millaard

    Junior Member

  • Members
  • PipPip
  • 17 posts

Posted 17 August 2011 - 10:42 AM

I have a query that should result in a Top-20 list.

mysql_select_db($database_mysql, $mysql);
$query_Recordset1 = 'SELECT `Computer_ID` , `Diskio` , `dvd` , `h264` , `MPE_On` FROM `Personal_data`,`Benchmark_results` WHERE Personal_data.Ref_ID = Benchmark_results.Ref_ID ORDER BY Rank ASC LIMIT 0, 20' ;
$Recordset1 = mysql_query($query_Recordset1, $mysql) or die(mysql_error());


This results in a correct list, but when displayed in a graph, the first record is left out:

Posted Image
Secondly, the names do not display correctly. For instance:

Harm's Beast is changed to Harm&apos. This happens all the time.

Finally I want to have a stacked chart, which I believe can only be stacked columns. That can be overcome, but how do I create a stacked column chart? All the examples are centered around static content, not dynamic content from mySQL.

Is there a function like 'addChartDataFromDatabase' that I can use?

The php file is included for reference.Attached File  Charts.php   1.52K   42 downloads

#2 Harm Millaard

Harm Millaard

    Junior Member

  • Members
  • PipPip
  • 17 posts

Posted 19 August 2011 - 03:37 PM

Not thanks to your speedy help, I have solved the first two problems.

It now looks like this:

Posted Image

Much better but not ready yet. See http://ppbm5.com/DB-PPBM5-3.php

Questions remaining:

1. How to set the caption font to a larger size?

2. How to add three other charts to the page?

3. How to set the scale on the horizontal axis to start at value 100 instead of 0?

4. How to increase the number of 'tics' on the horizontal axis from the default of 4 to another figure?

That is it for the moment. Just wondering IF I get any answer. Must be because the questions are either to noobish to answer or below your dignity.

Well, I still hope for some help.

#3 Harm Millaard

Harm Millaard

    Junior Member

  • Members
  • PipPip
  • 17 posts

Posted 20 August 2011 - 03:49 PM

2 and 4 I have solved.

#4 Sanjukta

Sanjukta

    Supreme Being

  • Administrators
  • 1926 posts

Posted 22 August 2011 - 11:37 AM

Hi,

1. How to set the caption font to a larger size?

>> Could you please try applying "Font Styles" to the 'CAPTION' object?
Ex:
<styles>
	<definition>
    	<style name='MyFirstFontStyle' type='font' font='Verdana' size='15' color='FF0000' />
	</definition>
	<application>
    	<apply toObject='Caption' styles='MyFirstFontStyle' />
	</application>
  </styles>

For further details, please refer to:
http://www.fusioncha...tyles/Font.html

3. How to set the scale on the horizontal axis to start at value 100 instead of 0?

>> Please try setting "yAxisMinValue" to '100' explicitly in the <chart> element.

Hope this helps. :)
Help us improve our documentation with your precious feedback at:
http://documentation...sioncharts.com/

Thanks,
Sanjukta

Follow us @Twitter!

#5 Swarnam

Swarnam

    Supreme Being

  • Moderators
  • 717 posts

Posted 22 August 2011 - 11:38 AM

Hi Harm Millard,

Sorry for the delayed response and glad to know some of your issues are resolved.:)

1. How to set the caption font to a larger size?
>>The caption font can be set to larger size using FusionCharts v3 Styles.
Code Snippet for setting the Caption of the chart Arial font with size 14:
<styles>
<definition>
<style name='myCaptionFont' type='font' font='Arial' size='14' color='666666' bold='1' underline='1'/>
</definition>
<application>
<apply toObject='Caption' styles='myCaptionFont' />
</application>
</styles>


Please refer the following link for more information:
http://www.fusioncha...tyles/Font.html

3. How to set the scale on the horizontal axis to start at value 100 instead of 0?
>> Since FusionCharts v3.2, this could be achieved by setting yAxisMinValue='100' .

I hope this helps.


2 and 4 I have solved.