?
Solved

How do I get strings to be untouched

Posted on 2013-12-10
1
Medium Priority
?
176 Views
Last Modified: 2014-01-08
I try to print this in a time series graph however it makes a number out of the 2013-1 => 2012 and the rest similarly. How do I avoid that?

[[2013-1, 0.39], [2013-2, 0.27], [2013-3, 0.60],[2013-4, 0.75],[2013-5, 0.6],[2013-6, 2],[2013-7, 5],[2013-8, 0.4],[2013-9, 15],[2013-10, 0.22],[2013-11, 0.36],[2013-12, 0.10]];
0
Comment
Question by:mdoland
1 Comment
 
LVL 22

Accepted Solution

by:
Kim Walker earned 2000 total points
ID: 39708381
Strings are delimited by quote marks. If you want 2013-1 to be a string instead of 2013 minus 1 = 2012, you must enclose it in quote marks. Single or double, doesn't matter in this case.
[['2013-1', 0.39], ['2013-2', 0.27], ['2013-3', 0.60],['2013-4', 0.75],['2013-5', 0.6],['2013-6', 2],['2013-7', 5],['2013-8', 0.4],['2013-9', 15],['2013-10', 0.22],['2013-11', 0.36],['2013-12', 0.10]];

Open in new window

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question