Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How do I get strings to be untouched

Posted on 2013-12-10
1
149 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 500 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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…

809 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