Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7192665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T19:59:17+00:00 2026-05-28T19:59:17+00:00

I have data in format [[x1, y1], [x2, y2],..]. x values are from 1

  • 0

I have data in format [[x1, y1], [x2, y2],..].
x values are from 1 to 31. It respresents days in month.
y values are temperature for these days.

When I plot these data with jqPlot, I get this:
enter image description here

Here is code:

$.post('php/database2json.php', function(data) {
                    var options = {
                        title: 'Месечна температура',
                        series: [
                            { label: 'Ниш'}
                        ],
                        axes:{
                            xaxis:{
                              label:'Дани',
                              labelRenderer: $.jqplot.CanvasAxisLabelRenderer
                            },
                            yaxis:{
                              label:'Температура',
                              labelRenderer: $.jqplot.CanvasAxisLabelRenderer
                            }
                        },
                        legend: {
                            show: $legenda
                        },
                        highlighter: {
                          show: $hover  
                        },
                        cursor:{ 
                            show: $zoom, 
                            zoom: $zoom,
false)
                                showTooltip: true
                            }
                        };
                        $('#placeholder').empty();
                        var plot1 = $.jqplot ('placeholder', [data], options);
                    },
                    'json'
                    );

How to make short this chart, to fit line?

EDIT: I get json array from post:
[[“1″,”-1″],[“2″,”0”],[“3″,”0”],[“4″,”0”],[“5″,”4”],[“6″,”5”],[“7″,”3”],[“8″,”2”],[“9″,”2”],[“10″,”1”],[“11″,”-2″],[“12″,”-2″],[“13″,”0”],[“14″,”1”],[“15″,”-2″],[“16″,”-1″],[“17″,”-1″],[“18″,”-2″],[“19″,”-1″],[“20″,”3”],[“21″,”-1″],[“22″,”0”],[“23″,”1”],[“24″,”3”],[“25″,”1”],[“26″,”1”],[“27″,”-1″],[“28″,”-1″],[“29″,”4”],[“30″,”5”],[“31″,”5”]]

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T19:59:18+00:00Added an answer on May 28, 2026 at 7:59 pm

    Your array values are strings. They should be numeric values. Modify your PHP script to return numeric (int or float) point pairs. Once you do that your plot will scale properly:

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have to put my database's data in this format (values will differ, obviously),
I have an application which obtains data in JSON format from one of our
I have this data coming from a XML: var searched = from c in
I have table with votes where data is written in this format: id_user|id_user2|value 1|2|-1
I have a data file with the format from above. I loaded it into
I have data in an Excel spreadsheet with values like this: 0.69491375 0.31220394 The
I have data saved from each loop run and it looks like this. val
I have data in the following format: 4:How do you do? 10:Happy birthday 1:Purple
I have some data in the format of C222 = 50 C1234P687 = 'some
I have data that is organized in kind of a key-key format, rather than

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.