• Hi. Fantastic looking plugin. Looks very powerful. Are there any resources to help me get started? In the meantime i tried to make a test XY graph using by ammending the values in the default provided. The default vlaues display fine, but my new ammended values do not. Can you shed some light?

    var %CHART% = AmCharts.makeChart(“%CHART%”, {
    “type”: “xy”,
    “pathToImages”: “http://www.amcharts.com/lib/3/images/”,
    “theme”: “none”,
    “dataProvider”: [{
    “y”: 849015,
    “x”: 2547.045,
    “value”: Account 1,
    “y2”: 589077,
    “x2”: 4123.539,
    “value2”: Account 2
    }, {
    “y”: 992016,
    “x”: 14880.24,
    “value”: Account 3,
    “y2”: 730936,
    “x2”: 12425.91,
    “value2”: Account 4
    }, {
    “y”: 427072,
    “x”: 2989.50,
    “value”: Account 5,
    “y2”: 485031,
    “x2”: 8245.52,
    “value2”: Account 6
    }, {
    “y”: 841932,
    “x”: 6735.45,
    “value”: Account 7,
    “y2”: 401630,
    “x2”: 3614.67,
    “value2”: Account 8
    }, {
    “y”: 438418,
    “x”: 4384.18,
    “value”: Account 9,
    “y2”: 399222,
    “x2”: 7585.21,
    “value2”: Account 10
    }, {
    “y”: 168649,
    “x”: 3204.33,
    “value”: Account 11,
    “y2”: 322049,
    “x2”: 4186.637,
    “value2”: Account 12
    }, {
    “y”: 426287,
    “x”: 3836.58,
    “value”: Account 13,
    “y2”: 83866,
    “x2”: 1509.58,
    “value2”: Account 14
    }],
    “valueAxes”: [{
    “axisAlpha”: 0
    }, {
    “minMaxMultiplier”: 1.2,
    “axisAlpha”: 0,
    “position”: “left”
    }],
    “startDuration”: 1.5,
    “graphs”: [{
    “balloonText”: “x:<b>x</b> y:<b>y</b>
    value:<b>value</b>”,
    “bullet”: “circle”,
    “bulletBorderAlpha”: 0.2,
    “bulletAlpha”: 0.8,
    “lineAlpha”: 0,
    “fillAlphas”: 0,
    “valueField”: “value”,
    “xField”: “x”,
    “yField”: “y”,
    “maxBulletSize”: 100
    }, {
    “balloonText”: “x:<b>x</b> y:<b>y</b>
    value:<b>value</b>”,
    “bullet”: “diamond”,
    “bulletBorderAlpha”: 0.2,
    “bulletAlpha”: 0.8,
    “lineAlpha”: 0,
    “fillAlphas”: 0,
    “valueField”: “value2”,
    “xField”: “x2”,
    “yField”: “y2”,
    “maxBulletSize”: 100
    }],
    “marginLeft”: 46,
    “marginBottom”: 35
    });

    https://wordpress.org/plugins/amcharts-charts-and-maps/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author martynasma

    (@martynasma)

    Thanks!

    it doesn’t work because “value” and “value2” fields expect a number. You have there things like Account 3 which is not a number and furthermore breaks JavaScript syntax resulting in error and no chart.

    I suppose what you’re aiming for is showing a label next to a bullet. Is that right?

    Thread Starter cprdata

    (@cprdata)

    Yes, a label would be great.

    Also are there any tutorials/documentation available to help me on the learning journal

    Plugin Author martynasma

    (@martynasma)

    In that case you should enclose those labels into quotes. Also remove these lines:

    "valueField": "value",

    and

    "valueField": "value2",

    And enable labels by setting “labelText” for both graphs.

    Here’s a full updated code:

    var %CHART% = AmCharts.makeChart( "%CHART%", {
      "type": "xy",
      "pathToImages": "http://www.amcharts.com/lib/3/images/",
      "theme": "none",
      "dataProvider": [ {
        "y": 849015,
        "x": 2547.045,
        "value": "Account 1",
        "y2": 589077,
        "x2": 4123.539,
        "value2": "Account 2"
      }, {
        "y": 992016,
        "x": 14880.24,
        "value": "Account 3",
        "y2": 730936,
        "x2": 12425.91,
        "value2": "Account 4"
      }, {
        "y": 427072,
        "x": 2989.50,
        "value": "Account 5",
        "y2": 485031,
        "x2": 8245.52,
        "value2": "Account 6"
      }, {
        "y": 841932,
        "x": 6735.45,
        "value": "Account 7",
        "y2": 401630,
        "x2": 3614.67,
        "value2": "Account 8"
      }, {
        "y": 438418,
        "x": 4384.18,
        "value": "Account 9",
        "y2": 399222,
        "x2": 7585.21,
        "value2": "Account 10"
      }, {
        "y": 168649,
        "x": 3204.33,
        "value": "Account 11",
        "y2": 322049,
        "x2": 4186.637,
        "value2": "Account 12"
      }, {
        "y": 426287,
        "x": 3836.58,
        "value": "Account 13",
        "y2": 83866,
        "x2": 1509.58,
        "value2": "Account 14"
      } ],
      "valueAxes": [ {
        "axisAlpha": 0
      }, {
        "minMaxMultiplier": 1.2,
        "axisAlpha": 0,
        "position": "left"
      } ],
      "startDuration": 1.5,
      "graphs": [ {
        "balloonText": "x: <b>x</b> y: <b>y</b> title:<b>value</b>",
        "labelText": "value",
        "bullet": "circle",
        "bulletBorderAlpha": 0.2,
        "bulletAlpha": 0.8,
        "lineAlpha": 0,
        "fillAlphas": 0,
        "xField": "x",
        "yField": "y",
        "maxBulletSize": 100
      }, {
        "balloonText": "x: <b>x</b> y: <b>y</b> title:<b>[[valueč]]</b>",
        "labelText": "value2",
        "bullet": "diamond",
        "bulletBorderAlpha": 0.2,
        "bulletAlpha": 0.8,
        "lineAlpha": 0,
        "fillAlphas": 0,
        "xField": "x2",
        "yField": "y2",
        "maxBulletSize": 100
      } ],
      "marginLeft": 46,
      "marginBottom": 35
    } );

    And here’s a live example:

    http://codepen.io/amcharts/pen/55dbae05e52f4290b1d0d397917fbb8b

    To get started with your charts, I suggest you take a look at this article:

    http://www.amcharts.com/tutorials/your-first-chart-with-amcharts/

    It’s about Serial chart, not XY, but it will give you fundamentals to understanding how charts work.

    I hope that helps.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Help to get started’ is closed to new replies.