- Screen name: Timur
Timur's Profile
5 Posts
7 Responses
0
Followers
Show:
- Expanded view
- List view
Private Message
- 29-May-2014 03:22 AM
- Forum: Using jQuery Plugins
I want to draw multiple line for this type of graph of your library :http://www.highcharts.com/stock/demo/basic-line
I found this sample on internet: http://jsfiddle.net/yildirim_timur/Hb3Q7/
Below you can see my html file. I tried to do couple of things but couldn't make it. How can i make my chart to be able to draw multiple lines as well? (it is for an ipad app project)
- <!DOCTYPE html>
- <html>
- <head>
- <meta http-equiv="content-type" content="text/html; charset=UTF-8">
- <title>Senior Project Timur Aykut YILDIRIM - IH Technology</title>
- <script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script>
- <link rel="stylesheet" type="text/css" href="/Users/ihtechnology/Desktop/chart_deneme/css/normalize.css">
- <link rel="stylesheet" type="text/css" href="/Users/ihtechnology/Desktop/chart_deneme/css/result-light.css">
- <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet"/>
- <script type='text/javascript'>
- var serviceDataURL = "http://78.46.106.130:83/get_item_data_ios?generic=";
- function setDictionary(x){
- return x;
- } // no need for this method
- var dict = "{\"line_ids\":[],\"measure\":\"1\",\"db_name\":\"NPI\",\"timeoffset\":433112400000,\"show_total\":true}";
- $(function() {
- $.getJSON(serviceDataURL.concat(dict), function(data) {
- // Create the chart
- window.chart = new Highcharts.StockChart({
- chart : {
- renderTo : 'container'
- },
- navigation: {
- buttonOptions: {
- enabled: false,
- width: 60
- }
- },
- rangeSelector : {
- buttonSpacing: 20,
- buttonTheme: { // styles for Q,Y,YTD,ALL buttons
- fill: 'none',
- stroke: 'none',
- 'stroke-width': 15,
- style: {
- color: '#039',
- fontWeight: 'bold'
- },
- states: {
- hover: {},
- select: {
- fill: '#039',
- style: {
- color: 'white'
- }
- }
- }
- },
- selected : 3, // 3=ALL buton at first
- inputDateFormat: '%Y-%m-%d',
- inputEditDateFormat: '%Y-%m-%d',
- buttons:[
- {
- type: 'month',
- count: 3,
- text: 'QQ'
- },
- {
- type: 'year',
- count: 1,
- text: 'YY'
- },
- {
- type: 'ytd',
- text: 'YTD'
- },
- {
- type: 'all',
- text: 'ALL'
- },
- ]
- },
- title : {
- text : 'My Total Market'
- },
- credits: {
- text: " ",
- href: " ",
- },
- series : [{
- name : 'Total Market',
- data : arr,
- tooltip: {
- valueDecimals: 2
- }
- }],
- exporting: {
- enabled: false
- }
- }, function(chart){
- // apply the date pickers
- setTimeout(function(){
- $('input.highcharts-range-selector').attr('readonly',1); // burda webviewı engelledik
- $('input.highcharts-range-selector', $('#'+chart.options.chart.renderTo))
- },0)
- });
- });
- });
- //]]>
- </script>
- </head>
- <body>
- <div id="container" style="height: 500px; min-width: 500px;"></div>
- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
- <script src="http://code.highcharts.com/stock/highstock.js"></script>
- <script src="http://code.highcharts.com/stock/modules/exporting.js"></script>
- </body>
- </html>
- 24-Apr-2014 06:39 AM
- Forum: Using jQuery
I'm trying to get JSON data from my webservice to display it in a data grid editor (developed with jquery) called Handsontable ( http://handsontable.com/ )Basically my JSON looks like this:- [
- ["", "2012", "2013", "2014(YTD)"],
- ["Ferrari", 1460089088.3900001, 1637243070.99, 283566771.55000001],
- ["Alfa Romeo", 1199141138.1900001, 1224624821.1500001, 192307335.49000001],
- ]
What i want to do is passing the whole json from webservice to initialize the variable called myData in my html file at once. I mean without using loops etc - the simples way since i'm very inexperienced in jQuery and i'm little bit confused after all those different things i read on the internet.Below you can download and/or see my html code:- <!DOCTYPE html>
- <html>
- <head>
- <meta http-equiv="content-type" content="text/html; charset=UTF-8">
- <link rel="stylesheet" type="text/css" href="/css/result-light.css">
- <script src="http://warpech.github.io/jquery-handsontable/lib/jquery.min.js"></script>
- <script src="http://warpech.github.io/jquery-handsontable/dist/jquery.handsontable.full.js"></script>
- <link rel="stylesheet" media="screen" href="http://warpech.github.io/jquery-handsontable/dist/jquery.handsontable.full.css">
- <link rel="stylesheet" media="screen" href="http://warpech.github.io/jquery-handsontable/demo/css/samples.css?20140401">
- <style type="text/css">
- body {background: white; margin: 20px;}
- h2 {margin: 20px 0;}
- </style>
- <script type='text/javascript'>
- $(document).ready(function () {
- var myData = ( [
- ["", "2012", "2013", "2014(YTD)"],
- ["Ferrari", 1460089088.3900001, 1637243070.99, 283566771.55000001],
- ["Alfa Romeo", 1199138.1900001, 1224821.1500001, 1923335.49000001],
- ]);
- $('#myTable').handsontable({
- data: myData,
- minSpareRows: 1,
- //colHeaders: true,
- contextMenu: true,
- readOnly: true,
- fixedColumnsLeft: 1
- });
- });
- </script>
- </head>
- <body>
- <div id="myTable" class="handsontable" style="width: 400px; margin-left:auto; margin-right:auto; background-color:silver"></div>
- </body>
- </html>
Attachments- demo.html.zip
- Size: 1.48 KB Downloads: 943
- 06-Jun-2012 01:45 PM
- Forum: Using jQuery
Hi, I've managed to make some sort of form which generates exam by jquery. And now i want to publish it. I'm using jsp. Is it possible to record my generated exam form into an xml file, and read it from server when user wants to take that exam, it will look as an exam form? If it is, how can i do it? Can you give me some examples?
Thanks in advance :)
Timur- 26-Mar-2012 05:57 AM
- Forum: Using jQuery Plugins
Hi,
i'm trying to make a simple webpage with jQuery, html and css. And i downloaded a treeview plugin which is developed with jQuery that helps me to display hierarchic view. When i downloaded the treeview plugin, it works fine in the html file that came inside the plugin's folder. But when i tried to move the codes into my own file, it doesn't work. i don't have much experience with jQuery or etc. But i will be appriciated if you point the problem. i installed my own page and treeview plugin to following addresses.Thanks in advance.
Timurmy html file: http://student.cankaya.edu.tr/~c0711058/problem/urun-001.htm
treeview plugin's directory: http://student.cankaya.edu.tr/~c0711058/problem/jquery.treeview/
treeview plugin's sample html file: http://student.cankaya.edu.tr/~c0711058/problem/jquery.treeview/demo/prerendered.html
- 08-Feb-2012 08:26 AM
- Forum: Getting Started
Hi,
I'm new with JavaScript and jQuery. I clonned below html table with this jQuery script:- $("#table1").clone().appendTo("#div1");
- <div id="div1">
- <table border="1" id="table1">
- <tr>
- <td colspan="5">Question text will be here</td>
- </tr>
- <tr>
- <td><input type="radio" id="A" name="ans" />answer1 <br /></td>
- <td><input type="radio" id="B" name="ans" />answer2 <br /></td>
- <td><input type="radio" id="C" name="ans" />answer3 <br /></td>
- <td><input type="radio" id="D" name="ans" />answer4 <br /></td>
- <td><input type="radio" id="E" name="ans" />answer5 <br /></td>
- </tr>
- </table>
- <table border="1" id="table1">
- <tr>
- <td colspan="5">Question text will be here</td>
- </tr>
- <tr>
- <td><input type="radio" id="A" name="ans" />answer1 <br /></td>
- <td><input type="radio" id="B" name="ans" />answer2 <br /></td>
- <td><input type="radio" id="C" name="ans" />answer3 <br /></td>
- <td><input type="radio" id="D" name="ans" />answer4 <br /></td>
- <td><input type="radio" id="E" name="ans" />answer5 <br /></td>
- </tr>
- </table>
- </div>
And now, I'm trying to is, changing id of clonned tables and clonned radiobuttons. I need to change clonned tables id properties, otherwise i can't select them on following steps of my project. And i also need to change name property of all radiobuttons, because i can only select one radiobutton on browser when it's like this.
I've read the documentation about the .attr() api over this page: http://api.jquery.com/attr/ . So I know how to change the attributes of an html element with jQuery, but i don't know, how to change these attributes of clonned html elements dynamically.
Can you help me with this please?- «Prev
- Next »
Moderate user : Timur
© 2013 jQuery Foundation
Sponsored by and others.

