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 8238345
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T19:46:58+00:00 2026-06-07T19:46:58+00:00

I am using jqplot for showing graphs which will show digital as well as

  • 0

I am using jqplot for showing graphs which will show digital as well as binary values. I am using dateAxisRenderer for the x-axis.

The data to be displayed is in the form of [timestamp, value]. Now the analog graph is working properly, but for the binary I have to show ON and OFF instead of 0 and 1 on the y-axis.

I am using ticks for this behavior and converting values to form [0, ‘OFF’] , [1, ‘ON’] to show the labels on y-axis. The graph shows the labels correctly after this but the values are not shown plotted.

Is there any way to convert the data to display i.e. the ‘value’ so that the values on y-axis are mapped with the required data to display?

  • 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-06-07T19:46:59+00:00Added an answer on June 7, 2026 at 7:46 pm

    Sounds like you need a second yaxis that is formatted with ‘Yes/No’ labels:

    enter image description here

    Here’s the fiddle I used to generate that…

    $(document).ready(function() {
        $.jqplot.config.enablePlugins = true;   
    
        var line1 = [[1,1],[2,2],[3,3],[4,4],[5,5]];
        var line2 = [[1,1],[2,0],[3,1],[4,1],[5,0]];
    
        $.jqplot('chart1', [line1, line2], {
            series: [
                {label: 'Analog'},
                {label: 'Yes/No', 'yaxis':'y2axis'},
    
            ],
            axes: {
                xaxis: {
                    label: 'Label'
                },
                yaxis: {
                    label: 'Analog'
                },
                y2axis:{
                    label: 'Yes/No',           
                    ticks: [0,1],
                    tickOptions:{formatter: 
                                 function (formatString, value){
                                     if (value == 0) return 'No';
                                     else if (value == 1) return 'Yes';
                                     else return "";
                                 }}
    
                }       
    
            }
        });
    });​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using jqplot to plot line graphs with dates in x axis ..
I am using jqPlot to show candlestick chart and the data is from XML
I am using below code to show Y axis of jqPlot at right side
I tried to plot data useage per day using jqPlot along with its DateAxisRenderer
I am using jqplot to show graphs in an accordion. http://www.jqplot.com/tests/UI.php When I just
I'm using jqPlot and I need to turn this JSON which I receive from
I am using jqPlot javascript library ( http://www.jqplot.com/ ) for graphs and charts in
How can I re-set ticks's formatString after a zoom operation? I'm using $.jqplot.DateAxisRenderer plugin
I’m using the jqPlot AJAX JSON Data Renderer as described in: http://www.jqplot.com/tests/data-renderers.php . My
using jqPlot, is it possible to limit the point labels to just one series?

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.