MyCode Google Graph in Thread Help
Code: Using MyCode to display a javascript google graph in a thread

Inspired by: Google Pie Chart [MyCode]

Description: I was looking through the Google Pie Chart code, and realized that it could be modified to allow for a google line graph.

With this MyCode I was trying to create a graph for a stock market role play, which could be edited by users.

What it does:
- It takes data as the Google Pie Chart MyCode does, and displays a line graph in a div.

MyCode so far:
Quote:Title: line
Regular Expression:
<script type="text/javascript" src=""></script><script type="text/javascript">function drawChart(){var a=google.visualization.arrayToDataTable([["Task","$15"],["$1",$2],["$3",$4],["$5",$6],["$7",$8],["$9",$10],["$11",$12],["$13",$14]]),b={title:"$15"},c=new google.visualization.LineChart(document.getElementById("linechart"));c.draw(a,b)}google.charts.load("current",{packages:["corechart", "line"]}),google.charts.setOnLoadCallback(drawChart);</script>
<div id="linechart" style="width: 900px; height: 500px;"></div>
Test Value:
- It will display in a thread but not as a new reply in that thread, even with different data.
- It isn't entirely user friendly.
- It may have security flaws of course.
- It isn't responsive yet, as I still need to play around with min/max width/height.


Forum Jump:

Users browsing this thread: 1 Guest(s)