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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:10:33+00:00 2026-06-14T17:10:33+00:00

I was trying to display the y axis values in the amcharts. Here is

  • 0

I was trying to display the y axis values in the amcharts. Here is the jsfiddle link.

Here is the html code:

<script src="http://www.amcharts.com/lib/amcharts.js" type="text/javascript">
</script>
<div id="chartdiv" style="width: 80%; height: 362px;align:right;">
</div>​

Here is the javascript code

    var lineChartData = [{
    date: new Date(2009, 10, 2),
    value: 5},
{
    date: new Date(2009, 10, 3),
    value: 15},
{
    date: new Date(2009, 10, 4),
    value: 13},
{
    date: new Date(2009, 10, 5),
    value: 17},
{
    date: new Date(2009, 10, 6),
    value: 15},
{
    date: new Date(2009, 10, 9),
    value: 19},
{
    date: new Date(2009, 10, 10),
    value: 21},
{
    date: new Date(2009, 10, 11),
    value: 20},
{
    date: new Date(2009, 10, 12),
    value: 20},
{
    date: new Date(2009, 10, 13),
    value: 19},
{
    date: new Date(2009, 10, 16),
    value: 25},
{
    date: new Date(2009, 10, 17),
    value: 24},
{
    date: new Date(2009, 10, 18),
    value: 26},
{
    date: new Date(2009, 10, 19),
    value: 27},
{
    date: new Date(2009, 10, 20),
    value: 25},
{
    date: new Date(2009, 10, 23),
    value: 29},
{
    date: new Date(2009, 10, 24),
    value: 28},
{
    date: new Date(2009, 10, 25),
    value: 30},
{
    date: new Date(2009, 10, 26),
    value: 72,
    customBullet: "http://www.amcharts.com/lib/images/redstar.png" // note, one line has a custom bullet defined
    },
{
    date: new Date(2009, 10, 27),
    value: 43},
{
    date: new Date(2009, 10, 30),
    value: 31},
{
    date: new Date(2009, 11, 1),
    value: 30},
{
    date: new Date(2009, 11, 2),
    value: 29},
{
    date: new Date(2009, 11, 3),
    value: 27},
{
    date: new Date(2009, 11, 4),
    value: 26}];

AmCharts.ready(function() {
    var chart = new AmCharts.AmSerialChart();
    chart.dataProvider = lineChartData;
    chart.pathToImages = "http://www.amcharts.com/lib/images/";
    chart.categoryField = "date";

    // sometimes we need to set margins manually
    // autoMargins should be set to false in order chart to use custom margin values
    chart.autoMargins = false;
    chart.marginRight = 0;
    chart.marginLeft = 0;
    chart.marginBottom = 22;
    chart.marginTop = 0;

    // AXES
    // category                
    var categoryAxis = chart.categoryAxis;
    categoryAxis.parseDates = true; // as our data is date-based, we set parseDates to true
    categoryAxis.minPeriod = "DD"; // our data is daily, so we set minPeriod to DD
    categoryAxis.gridAlpha = 0;
    categoryAxis.tickLength = 0;
    categoryAxis.axisAlpha = 0;
    categoryAxis.title = "ko";

    // value
    var valueAxis = new AmCharts.ValueAxis();
    valueAxis.dashLength = 4;
    valueAxis.axisAlpha = 0;
    valueAxis.title="Count";
    chart.addValueAxis(valueAxis);

    // GRAPH
    var graph = new AmCharts.AmGraph();
    graph.type = "line";
    graph.valueField = "value";
    graph.lineColor = "#D8E63C";
    graph.customBullet = "http://www.amcharts.com/lib/images/star.gif"; // bullet for all data points
    graph.bulletSize = 14; // bullet image should be a rectangle (width = height)
    graph.customBulletField = "customBullet"; // this will make the graph to display custom bullet (red star)
    chart.addGraph(graph);

    // CURSOR
    var chartCursor = new AmCharts.ChartCursor();
    chart.addChartCursor(chartCursor);

    // WRITE
    chart.write("chartdiv");
});​
  • 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-14T17:10:34+00:00Added an answer on June 14, 2026 at 5:10 pm

    There are two options:

    1) set valueAxis.inside = true;

    2) delete these two lines:

    chart.autoMargins = false;
    chart.marginRight = 0;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What I'm trying to achieve here is to read the y-axis values of the
I am trying to display all possible values for a sub-property. Below I am
I am trying to plot some data in Flot that should display x-axis in
I'm trying to display ticks and label together on Y axis but the texts
I'm trying do display a time line in wp7 using amCharts quickCharts . <amq:SerialChart
I am trying display customized text behind my embedded Flash swf file on HTML.
trying to display data only after variables have been set. $(document).ready(function () { function
Trying to display current time with PHP (using this ): $date = date('m/d/Y h:i:s
Im trying to display some files in a web page so the user can
I am trying to display data that I am getting from server through json.

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.