Advertisement:

Author Topic: Simple Chart V 0.5  (Read 33026 times)

Offline Jade Elizabeth

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,647
  • Gender: Female
  • Keep your enemies close and your friends closer ;)
    • jadetrainor on LinkedIn
    • @alundra on Twitter
    • Jades-World
Re: Simple Chart V 0.5
« Reply #40 on: November 05, 2012, 01:57:12 AM »
I have a small forum theme and I want the pie to be 200-400px but it's HUGE. I can't make it smaller....any advice please? :)
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Offline Akyhne

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,331
Re: Simple Chart V 0.5
« Reply #41 on: November 05, 2012, 07:25:03 AM »
Hi Jade.

I haven't found a proper method to resize the svg files the way I want yet.
I have fixed a few things, regarding the pies. A new silent update has been made to the download page.

So for now, all you can do, is to edit the script that generates the BBC. It's located in your Sources folder ./Sources/Subs-SimpleChart.php

On line #217:
Code: [Select]
<object' . ($no_of_values > 40 ? ' width="1050px"' : ($no_of_values > 20 ? ' width="840px"' : ' width="630px"')) . ' height="430px" class="pie_object" data="' . $boardurl . '/Simple_Chart/SimplePie.php?data=' . $pie_data . '&amp;max=' . $chart_ceil . '" ></object>
Change to...
Code: [Select]
<object' . ($no_of_values > 40 ? ' width="525px"' : ($no_of_values > 20 ? ' width="420px"' : ' width="315px"')) . ' height="215px" class="pie_object" data="' . $boardurl . '/Simple_Chart/SimplePie.php?data=' . $pie_data . '&amp;max=' . $chart_ceil . '" ></object>This will reduce the size to 50% (way to small for my eyes). You may find the fonts to be a bit to small. If so, edit ./Simple_Chart/css/pie.css

On line #13
Code: [Select]
text
{
font-size: 14px;
}

Edit to the font-size you want.

Please remember to download Simple Chart v 0.5 again and upload to your server, before making any changes!

Offline Jessica.

  • Full Member
  • ***
  • Posts: 468
  • Gender: Female
  • I use SMF 2.0.2, Default theme
    • Testing Zone
Re: Simple Chart V 0.5
« Reply #42 on: November 05, 2012, 04:15:15 PM »
okay here's my info
http://testplace.net23.net/index.php
Username: Test
Password: test123


EDIT: I figured out the problem. I had that view source thing enabled...
Testing Zone - SMF 2.0.7, default Curve
School & Chat - phpBB3, over 170 mods installed, official live forum

I use the latest version of Chrome

phpBB: Forum = a section; Board = whole site
SMF: Forum = whole site; Board = a section

Offline Akyhne

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,331
Re: Simple Chart V 0.5
« Reply #43 on: November 05, 2012, 04:50:30 PM »
Except for the fact that your forum theme is somehow broken, the dropdown works as it should.

Offline Jessica.

  • Full Member
  • ***
  • Posts: 468
  • Gender: Female
  • I use SMF 2.0.2, Default theme
    • Testing Zone
Re: Simple Chart V 0.5
« Reply #44 on: November 05, 2012, 04:57:42 PM »
Yeah it works now

What do you mean by saying my forum theme is broken? Looks fine to me..
Testing Zone - SMF 2.0.7, default Curve
School & Chat - phpBB3, over 170 mods installed, official live forum

I use the latest version of Chrome

phpBB: Forum = a section; Board = whole site
SMF: Forum = whole site; Board = a section

Offline Akyhne

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,331
Re: Simple Chart V 0.5
« Reply #45 on: November 05, 2012, 05:14:57 PM »
Well, try logging in with your test account. The theme is broken. If you don't see it, I'll post a screenshot.

Offline Jessica.

  • Full Member
  • ***
  • Posts: 468
  • Gender: Female
  • I use SMF 2.0.2, Default theme
    • Testing Zone
Re: Simple Chart V 0.5
« Reply #46 on: November 05, 2012, 06:45:20 PM »
Okay I did that but it still looks fine. I'm using Chrome. Are you using a different browser or something? I guess you should post a screenshoot >_<
Testing Zone - SMF 2.0.7, default Curve
School & Chat - phpBB3, over 170 mods installed, official live forum

I use the latest version of Chrome

phpBB: Forum = a section; Board = whole site
SMF: Forum = whole site; Board = a section

Offline Akyhne

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,331
Re: Simple Chart V 0.5
« Reply #47 on: November 06, 2012, 01:56:54 AM »
Seems ok now.

Offline available

  • Semi-Newbie
  • *
  • Posts: 27
    • แต่งรถ
Re: Simple Chart V 0.5
« Reply #48 on: November 06, 2012, 03:49:23 AM »
Interesting mod

Offline littlenicki

  • Jr. Member
  • **
  • Posts: 195
Re: Simple Chart V 0.5
« Reply #49 on: November 09, 2012, 06:19:35 PM »
Hello, this looks like a great mod. Can it be backported to SMF 1.1 please? Thank you Nicole
Fomer SMF user. Switched to Invision Power Board and VBulletin

Offline Akyhne

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,331
Re: Simple Chart V 0.5
« Reply #50 on: November 09, 2012, 06:48:56 PM »
No chance, sorry.

Offline Jade Elizabeth

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,647
  • Gender: Female
  • Keep your enemies close and your friends closer ;)
    • jadetrainor on LinkedIn
    • @alundra on Twitter
    • Jades-World
Re: Simple Chart V 0.5
« Reply #51 on: November 10, 2012, 10:50:12 PM »
I upgraded and it's just not working how I expected ha ha.

I made the changes you suggested and I changed the width in SimplePie.php as well :). It's set to 490px.
http://www.bunnyrabbitsex.com/chatter/testing-pie-charts/

I made the font size in SimplePie.php 24. I'm trying to get the thing to make the height change so that text isnt hidden.


Thanks for the help Aky!! <3
« Last Edit: November 11, 2012, 02:11:37 AM by Jade Elizabeth »
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Offline Akyhne

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,331
Re: Simple Chart V 0.5
« Reply #52 on: November 11, 2012, 07:37:49 AM »
How are you making the line breaks?

You can't have small size pie charts and large text. You need to choose.

Offline Adrian Malacoda

  • Semi-Newbie
  • *
  • Posts: 11
  • Gender: Male
Re: Simple Chart V 0.5
« Reply #53 on: November 13, 2012, 12:24:28 AM »
How are you making the line breaks?

That was my work. The code looks something like this
Code: [Select]
$text = split("\n",wordwrap($chart_keys[$c][0], $line_width));

$first = true;
foreach ($text as $line)
{
if ($first)
{
$svg .= '
<g class="text_holder" onmouseover="Highlight(evt, \'cake' . $c . '\', \'text_bg' . $c . '\');" onmouseout="Unhighlight(evt, \'cake' . $c . '\', \'text_bg' . $c . '\');">
<rect id="text_bg' . $c . '" x="' . $text_offsetX . '" y="' . $text_offsetY . '" width="198" height="' . $line_height . '" stroke="none" stroke-width="0" fill-opacity="0" fill="#ccd"/>
<text text-anchor="start" x="' . ($text_offsetX + 24) . '" y="' . ($text_offsetY +13) . '" font-family="Arial" font-size="' . $fontSizeFinal . '" stroke="none" stroke-width="0" fill="#222222">' . $line . ' (' . $chart_keys[$c][1] . ')</text>
<rect id="cake' . $c . '_box" x="' . $text_offsetX . '" y="' . $text_offsetY . '" width="14" height="14" stroke="none" stroke-width="0" fill="' . $colors[$c] . '"/>
</g>';
$first = false;
}
else
{
$text_offsetY = $text_offsetY + $line_height;
$svg .= '
<g class="text_holder" onmouseover="Highlight(evt, \'cake' . $c . '\', \'text_bg' . $c . '\');" onmouseout="Unhighlight(evt, \'cake' . $c . '\', \'text_bg' . $c . '\');">
<rect id="text_bg' . $c . '" x="' . $text_offsetX . '" y="' . $text_offsetY . '" width="198" height="' . $line_height . '" stroke="none" stroke-width="0" fill-opacity="0" fill="#ccd"/>
<text text-anchor="start" x="' . ($text_offsetX + 24) . '" y="' . ($text_offsetY +13) . '" font-family="Arial" font-size="' . $fontSizeFinal . '" stroke="none" stroke-width="0" fill="#222222">' . $line . ' </text>
</g>';
}
}

where $line_width is 40.

Offline Akyhne

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,331
Re: Simple Chart V 0.5
« Reply #54 on: November 13, 2012, 02:02:43 AM »
Well, you can't just split that way, without making some other changes to the code. The <tspan> is also the correct way of splitting up a text.

I already made it for the next version. But it won't help a lot for Jade, if she insists on having such a tight layout. She needs text to be much smaller or live with much wider charts.

Offline Eclipse16V

  • Sophist Member
  • *****
  • Posts: 1,070
  • Gender: Male
  • Tornado Map
    • Eclipse16V on Facebook
    • @Eclipse16V on Twitter
    • Tornado Map
Re: Simple Chart V 0.5
« Reply #55 on: November 13, 2012, 08:01:16 AM »
Thanks for this Mod
I worked with:
SMF 2 in German

My Shop:
Das Lieschen

Offline Jade Elizabeth

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,647
  • Gender: Female
  • Keep your enemies close and your friends closer ;)
    • jadetrainor on LinkedIn
    • @alundra on Twitter
    • Jades-World
Re: Simple Chart V 0.5
« Reply #56 on: November 13, 2012, 06:09:35 PM »
If it would resize like the tag suggests I would have no issue at all. I will have wider layouts in certain areas but I'm forced to make the pies tiny because they don't resize.

I'll update when they resize.
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

bojanbgrd

  • Guest
Re: Simple Chart V 0.5
« Reply #57 on: January 12, 2013, 05:21:47 PM »
Hi there  :)

This is excellent mod, but I have a small problem, same as ®Shambles had - there is no pie or gauge images.  Stars and bars are shown perfectly, but pies and gauges not.  And there is no errors shown ???
On my test forum, everything worked perfectly.

Where could be a problem? 

Thank on your help in advance :)

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,157
  • Gender: Male
    • i30 Owners Club
Re: Simple Chart V 0.5
« Reply #58 on: January 12, 2013, 05:24:16 PM »
I never did resolve my issue with the pies & gauges :(

bojanbgrd

  • Guest
Re: Simple Chart V 0.5
« Reply #59 on: January 13, 2013, 04:28:08 AM »
®Shambles  I found solution :)  I hope it will work in your forum too :)

Firstly, I changed file Subs-SimpleChart.php  by replacing all  /Simple_Chart with /Simple/Simple_Chart. I have uploaded  Subs-SimpleChart.php here so you can see the changes I've made  (sorry for my English :( )

Than, in root, I put folder named Simple and put Simple_Chart folder inside that folder and everything worked like a charm :D