Forum - jschmidt-systemberatung.de

× php-RGraph and php-rgraph Joomla Content Plugin

Data from MySql Database using K2

  • Vlask
  • Topic Author
  • Visitor
  • Visitor
3 years 7 months ago #1250 by Vlask
Replied by Vlask on topic Data from MySql Database using K2

jochen wrote: 2.you cannot use percent values for width or height (html5 'canvas' doesnot support this)


Maybe found solution, but i'm not sure that can be used with joomla plugin and for sure i dont know how to properly implement the code....Simplest example can be found in offline RGRAPHs demos under name "A responsive Horizontal Bar chart"
They seems to be using responsive function to define graphs size as well fonts sizes according to screen resolutions. But i have to define them manually. Code looks like this...not sure that i can use it in this formatting...

}).grow().responsive([
                  {maxWidth: 600, width: 400, height: 200, options: {textSize: 8}},
{maxWidth: 900, width: 400, height: 200, options: {textSize: 12}},
{maxWidth: null, width: 700, height: 350, options: {textSize: 19}}

Info page about function is here -  www.rgraph.net/canvas/responsive.html

You think that this can be used together with joomla?

jochen wrote: cannot access your flashchart sample ( vgamuseum.info/index.php/charts/fillrates ) - it kills  my browser (firefox)

It works in Opera, its disabled in chrome and firefox portable show something, but its not drawed properly. Thats why i need to change from flash plugin.

Please Log in or Create an account to join the conversation.

More
3 years 7 months ago - 3 years 7 months ago #1251 by jochen
Replied by jochen on topic Data from MySql Database using K2
hi,

chart options  "responsive" has not (yet) been implemented - I have to look into this. Anyway this does only help with text and not with canvas-graphics. Canvas Size (width and height) must be set to number of pixels. (e.g. if you specify "100%" size will be set to "100"). You may google about this - you will find  lots of discussions about this topic..

There is no easy standard way from a server (php) perspective to find out the pixel-size of your document area within a browser client window,, in order to set canvas size to a desired value.
 
So the best and easiest way is in my opinion to leave it to the user.  
Last edit: 3 years 7 months ago by jochen.
The following user(s) said Thank You: Vlask

Please Log in or Create an account to join the conversation.

Time to create page: 0.679 seconds
Powered by Kunena Forum
We use cookies

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.