Stats & Charts Bb Codes

Stats & Charts Bb Codes 1.0.2

No permission to download
@cclaerhout
Does this addon support plotting these types of line graphs?
basicoptions.png


Can we space the horizontal axis in steps of 2.0 for instance and plot the y in between the x value steps (like fig) - hope I am making sense.
 

Attachments

  • line-graphs.webp
    line-graphs.webp
    8.5 KB · Views: 10
Last edited:
@cclaerhout
Does this addon support plotting these types of line graphs?
basicoptions.png


Can we space the horizontal axis in steps of 2.0 for instance and plot the y in between the x value steps (like fig) - hope I am making sense.
Directly no, I didn't integrate this. But you should be able to do something similar. Read the Faq, it's fully detailed.
 
  • Like
Reactions: vij
Directly no, I didn't integrate this. But you should be able to do something similar. Read the Faq, it's fully detailed.
I can plot it in some way, but it looks like I cannot assign specific "step values"(2, 4, 6, 8) on the X axis and have the Y plot between the step values. So with this addon if I have to plot 4 on the y with 2.5 on the X - the "2.5 on the x" will have to show up as a data point. That's not ideal

My inference is that the implementation for line graph is very limited -

Also 2 general issues
1. Whenever I use {title} - nothing renders. I seem to have missed something.
2. A lot of the time, when I type the chart code in the editor and hit enter - nothing shows up. But then I refresh the page and the chart shows up. I am on 1.4.9
 
Last edited:
Whenever I use {title} - nothing renders. I seem to have missed something.
I will have a look.

A lot of the time, when I type the chart code in the editor and hit enter - nothing shows up
I've tried to avoid that, but there are really a lot of Javascript files to load with priority order. The BBM should have a feature to load them by priority. I don't think I can do more here.

I can plot it in some way, but it looks like I cannot assign specific "step values"(2, 4, 6, 8) on the X axis and have the Y plot between the step values. So with this addon if I have to plot 4 on the y with 2.5 on the X - the "2.5 on the x" will have to show up as a data point. That's not ideal
Yes, you're right. I've no time to integrate a new type of chart right now.
 
  • Like
Reactions: vij
I will have a look.
Thankyou :)

I've tried to avoid that, but there are really a lot of Javascript files to load with priority order. The BBM should have a feature to load them by priority. I don't think I can do more here.
If its just a harmless quirk, it's ok(since only admins use this at my forum), but I was worried if it was breaking something. No server errors though.
Yes, you're right. I've no time to integrate a new type of chart right now.
How I wish you could make this a full featured paid charts addon. I know there are few desperate buyers at area51 ;)
 
If its just a harmless quirk, it's ok(since only admins use this at my forum), but I was worried if it was breaking something. No server errors though.
Can you provide me please your Bb Code content, that will be easier for me to test.

How I wish you could make this a full featured paid charts addon. I know there are few desperate buyers at area51
I won't make a light/full addon system. I will try to release the integration of that chart type in this product if I find time.
 
Will this addon alow me fo example to have lets say 3 pie charts where the users can vote in polls for the various charts, i guess what i want to hear is if I am able to have multiple polls in a thread with this addon.
 
Is there a way to increase the width of the bar charts? If the axis labels are too big then the graph becomes unreadable.

Fantastic mod btw. :)
 
Hi @cclaerhout Cédric, I think I may have found a bug in your add-on.

When you edit a post that contains a stats bbcode inside, when the post reload (from ajax) it fires a js error in the console:
SCRIPT5022: Target dimension not set File: bbm_6_jquery.jqplot.min.js, Line: 3, Column: 33837

I quickly looked at the js and I think it comes from the fact that if the object exists in the dom, your js code tries to quickly initialize instead of doing a full creation.
The error comes from the function quickInit here:
Code:
            // Plot should be visible and have a height and width.
            // If plot doesn't have height and width for some
            // reason, set it by other means.  Plot must not have
            // a display:none attribute, however.
           
            this._height = this.target.height();
            this._width = this.target.width();
           
            if (this._height <=0 || this._width <=0 || !this._height || !this._width) {
                throw new Error("Target dimension not set");
            }

So apparently there is no width and height if you edit. But from your comment, it seems that it shouldn't be an issue if height and width are set.
However the throw error code seems to lead to the contrary.

I may go further into the analysis but I guess you might be able to answer faster than me investigating into the whole code :)

FYI, below the bbcode with which I produced the error (in case it may come from the bbcode usage):
Code:
[bar=600x@|no-tick|pad:0|legend:no|zoom|point-labels]
{title=center}My data flow from Aug 1, 2016 to Aug 7, 2016{/title}
{xaxis=no-tick-mark}{/xaxis}
{yaxis=string:dollar|tick-zero|formatString: "%#.2f"|label-angle:-90}My data{/yaxis}
{data=no-renderer|animate:2000}
500.00; 300.00; 220.00; 1713.69; 1834.49; 720.00; 450.00; 1579.46; 1491.39; 500.00; 600.00; 700.00; 800.00; 1000.00; 520.00; 640.00; 670.00; 880.00; 900.00; 100.00{/data}
{points}|||||||||||||||||||{/points}
{zoom=loose}{/zoom}
{hl=tooltip:s|tooltip-axis:y|size-adjust:7.5}{/hl}
[/bar]

Clément
 
@MtoR:
I've just made the test on my dev board and I can't reproduce the error. I've tried to put several charts in the same post and in the same page, good for me.
 
@cclaerhout:

With the bbcode I posted and after edit (with replies reloaded through ajax) ?
I just tested posted the bbcode, then refreshed the page, then edit the post, save.

Automatically I get that error :
bbm_6_jquery.jqplot.min.js?_v=04ce093f:2367 Uncaught Error: Target dimension not set
 
Yes, but on a local installation. May be a race condition.

In any case, what would be the impact of not throwing that error ? Is there really an issue with "dimension" not being set ?

Oh an forgot to mention that I have this error on my server but my customer has it too.
 
Back
Top Bottom