This topic is locked
[SOLVED]

 Change Chart width

8/7/2018 10:23:05 AM
PHPRunner General questions
gehrenfeld author

The chart I have does not display all the data and I need to make the chart width larger.
Pretty sure I will have to add code to JavaScript Chart Modify.
How would I do that.

C
cristi 8/7/2018

You could add a horizontal scroller using chart modify event:

var currentScroller = chart.xScroller();
currentScroller.enabled(true);
HJB 8/7/2018

https://xlinesoft.com/phprunner/docs/chartmodify.htm
Example 2. Add horizontal scroller and set initial zoom to 50%.
var zoom = chart.xZoom();
zoom.setTo(0, 0.5);
var currentScroller = chart.xScroller();
currentScroller.enabled(true);
unquote
... just tentatively placed a MINUS before "0.5" factor above and checked SYNTAX to be okay.
In other words, rather than to start with a ZOOM-IN by 50%, it seems that as well a ZOOM-OUT

start-up by 50% is possible ...

gehrenfeld author 8/8/2018



https://xlinesoft.com/phprunner/docs/chartmodify.htm
Example 2. Add horizontal scroller and set initial zoom to 50%.
var zoom = chart.xZoom();
zoom.setTo(0, 0.5);
var currentScroller = chart.xScroller();
currentScroller.enabled(true);
unquote
... just tentatively placed a MINUS before "0.5" factor above and checked SYNTAX to be okay.
In other words, rather than to start with a ZOOM-IN by 50%, it seems that as well a ZOOM-OUT

start-up by 50% is possible ...


Not what I am really looking for. Having a scroll bar on a line chart IMO defeats the purpose of seeing the total trend.
I was wondering if there was a way to use custom CSS.

HJB 8/8/2018



Not what I am really looking for. Having a scroll bar on a line chart IMO defeats the purpose of seeing the total trend.
I was wondering if there was a way to use custom CSS.


Sure ..., sequel to the BizWiz "Only ask for the IMPOSSIBLE first to finally end up with the BEST possible!" at least me is sure off that a MINUS 50% zoom-out might be one smart way to view the whole (your total trend), anyway, I personally doubt that "custom CSS" could work to solve the full view problem for technical reasons, so let us see any proposals what else is offered any time from now on this forum.

gehrenfeld author 8/8/2018



Sure ..., sequel to the BizWiz "Only ask for the IMPOSSIBLE first to finally end up with the BEST possible!" at least me is sure off that a MINUS 50% zoom-out might be one smart way to view the whole (your total trend), anyway, I personally doubt that "custom CSS" could work to solve the full view problem for technical reasons, so let us see any proposals what else is offered any time from now on this forum.


What I am putting together is a way to enter glucose metering readings so people like me can then run a chart and see how well they are handling there insulin. The chart is a nice way to see if you are trending up or down. So that is why we need to see the whole chart.
Also, there will betimes when some user will have 10 readings in a 10 day period and some will have 20. So the chart has to be able to expand to be able to see the 10 day trend.
PHPRunner may not be able to handle doing that because of the way it is structured but I thought I would ask.

jadachDevClub member 8/8/2018

You can change the size of the chart in html view of the editor.

gehrenfeld author 8/9/2018



You can change the size of the chart in html view of the editor.


That is what I need.
Thank you