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

  • Home
  • SEARCH
  • 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 9268365
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T14:47:37+00:00 2026-06-18T14:47:37+00:00

I’m using bar chart(amcharts) in my application and i need to include Legends for

  • 0

I’m using bar chart(amcharts) in my application and i need to include Legends for that bar charts. so, i added the following scripts for bar script,

legend = new AmCharts.AmLegend();
legend.position = "bottom";
legend.align = "center";
legend.markerType = "square";
legend.valueText = "";
chartx.addLegend(legend);

but, the bar chart should show Legends? how do i add legends in my bar chart application.

can anyone give me the solution for this issue asap?

  • 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-18T14:47:38+00:00Added an answer on June 18, 2026 at 2:47 pm

    try the above sample i have edited the sample provided by amchart

        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
            <title>amCharts examples</title>
            <link rel="stylesheet" href="style.css" type="text/css">
            <script src="../amcharts/amcharts.js" type="text/javascript"></script>
            <script type="text/javascript">
                var chart;
    
                var chartData = [{
                    year: 2005,
                    income: 23.5
                }, {
                    year: 2006,
                    income: 26.2
                }, {
                    year: 2007,
                    income: 30.1
                }, {
                    year: 2008,
                    income: 29.5
                }, {
                    year: 2009,
                    income: 24.6
                }];
    
    
                AmCharts.ready(function () {
                    // SERIAL CHART
                    chart = new AmCharts.AmSerialChart();
                    chart.dataProvider = chartData;
                    chart.categoryField = "year";
                    // this single line makes the chart a bar chart,
                    // try to set it to false - your bars will turn to columns
                    chart.rotate = true;
                    // the following two lines makes chart 3D
                    chart.depth3D = 20;
                    chart.angle = 30;
    
                    // AXES
                    // Category
                    var categoryAxis = chart.categoryAxis;
                    categoryAxis.gridPosition = "start";
                    categoryAxis.axisColor = "#DADADA";
                    categoryAxis.fillAlpha = 1;
                    categoryAxis.gridAlpha = 0;
                    categoryAxis.fillColor = "#FAFAFA";
    
                    // value
                    var valueAxis = new AmCharts.ValueAxis();
                    valueAxis.axisColor = "#DADADA";
                    valueAxis.title = "Income in millions, USD";
                    valueAxis.gridAlpha = 0.1;
                    chart.addValueAxis(valueAxis);
    
                    // GRAPH
                    var graph = new AmCharts.AmGraph();
                    graph.title = "Income";
                    graph.valueField = "income";
                    graph.type = "column";
                    graph.balloonText = "Income in [[category]]:[[value]]";
                    graph.lineAlpha = 0;
                    graph.fillColors = "#bf1c25";
                    graph.fillAlphas = 1;
                    graph.lineThickness = 2;
                    graph.bullet = "round";
                    chart.addGraph(graph);
    
    
                                    // LEGEND
                                   var legend = new AmCharts.AmLegend();
                                    legend = new AmCharts.AmLegend();
                                    legend.position = "bottom";
                                    legend.align = "center";
                                    legend.markerType = "square";
                                    legend.valueText = "aa";
                    chart.addLegend(legend);
    
    
    
    
    
    
                    // WRITE
                    chart.write("chartdiv");
                });
            </script>
        </head>
    
        <body>
            <div id="chartdiv" style="width: 500px; height: 600px;"></div>
        </body>
    
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a small JavaScript validation script that validates inputs based on Regex. I
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I need a function that will clean a strings' special characters. I do NOT
I have thousands of HTML files to process using Groovy/Java and I need to
I am using JSon response to parse title,date content and thumbnail images and place
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to find ID3V2 tags from MP3 file using jid3lib in Java.

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.