Git Product home page Git Product logo

amcharts's People

Contributors

andrewschenk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

amcharts's Issues

Support for candle stick type chart

I m a iPhone developer. Your API is very helpful. I want to implement the candle stick type chart but not able to. Can you please guide me the steps to implement.

In the AmChartLibrary/AppDelegate I have changed the code 

    AmStockGraph *stockGraph = [[AmStockGraph alloc] init];
    stockGraph.uid = @"graph1";
    stockGraph.valueField = @"value";
    stockGraph.type = @"candlestick";
    stockGraph.title = @"MyGraph";
    stockGraph.hidden = YES;
    stockGraph.markerType = @"square";
    stockGraph.openField = @"open";
    stockGraph.lowField = @"low";
    stockGraph.highField = @"high";
    stockGraph.closeField = @"close";
    stockGraph.useDataSetColors = NO;
    stockGraph.fillAlphas = [NSNumber numberWithInteger: 1];
    stockGraph.lineColor = @"green";
    stockGraph.fillColors = @"green";
    stockGraph.negativeLineColor = @"red";
    stockGraph.negativeFillColors = @"red";
    stockChart.chartScrollbarSettings.graphType = @"candlestick";

But still not able to see any candle type.. Can you please give me the detail steps to run the app for candle stick type chart

Scroll Bar Chart

  1. I tried to display the scroll bar chart using the code below but failed.
    chart.chartScrollbar.scrollbarHeight = @(30);
  2. Navigation bar hides the full graph view, how do I adjust the view?
    Please refer to the image attached.
    ios simulator screen shot dec 9 2014 9 41 58 am

validateData() method

let map:AmMap = AmMap.init()
map.type = "map"
map.theme = "none"
map.pathToImages = "ammap/images/"
map.responsive.enabled = true
let mapData:AmMapData = AmMapData()
mapData.map = "worldLow"

map.mapDataProvider = mapData
mapView.chart = map
mapView.drawChart()

How i can update existing map ?

map.validateData()
map.validateNow()

Is not availible for me...

clickMapObject

Me again. I have been struggling with how to determine which country was selected in the map. I create an array of countries which I use to populate other charts data.
In my website .js version I do this:

var arrCountry = [];

map.addListener('clickMapObject', function (event) {
arrCountry = [];
var selectedCountry = event.mapObject.id;
arrCountry.push(selectedCountry);
}

I don't know how to reference 'clickMapObject' for iOS.

Also, I can't figure out what to call when I 'manually' want to select a country. (A search result will return a country that I use to select in map)

My code is Swift - I am happy to have any help in Objective-c and I can just translate

var countryArray = ["US"];
for sArea in map.mapDataProvider.areas as NSArray as [AmMapArea]{
var areaID = sArea.uid;
if contains(countryArray, areaID!){
sArea.showAsSelected = true; // highlights
// How to zoom here? ( I am using an array but in this case it will always only have one country)
}else{
sArea.showAsSelected = false;
}

Thank you

AmMaps

Love AmCharts, AmMaps, it is a huge part of our web data display. I understand the js version but I am really struggling with the wrapper classes. Currently working on an iPad app, I have pie charts, barcharts all working fine. I can't seem to find an example of the wrapper classes for amMaps and its killing me. Could you point me to a simple snippet of how to set up the map? Thank you.

Chart guide lines has NSDate parameter, but JSONserialization does not accept NSDates.

Hello,

I'm trying to add guide lines to my graph for the category axis. The "date" and toDate" variables take NSDate parameters, but JSONserialization does not seem to accept date variables. Even if I change the variables to accept strings, Amcharts ultimately wants a Date variable for these parameters.

This is the error I get: 'Invalid type in JSON write (__NSTaggedDate)', which occurs in:
NSDictionary+JSONString.m

Any help on solving this issue?

Thanks for your time and assistance

Callbacks and functions

Hi,

Great package - I'm using it!

Is it possible to receive any callbacks/delegate methods? I've tried but not succeeded.

Also, how do I invoke labelFunction? I have:

_valAxis.labelFunction =

Just don't get it how I define that function so that it can take the parameters that are passed: value & valueText. The valueAxis parameter is no problem.

"This function is called and these parameters are passed: labelFunction(value, valueText, valueAxis); Where value is numeric value, valueText is formatted string and valueAxis is a reference to valueAxis object. Your function should return string."

Any help greatly appreciated!

Best regards,
Micke

Cocoapods integration

Hello,

Great decision to open source this component this is fantastic for the community of iOS/MacOS developers.

Could you consider creating a podspec and publish it at the cocoapods specs repository for easy integration in applications? Nobody drags and drops components into projects anymore these days :)

Thanks!

Archiving issue

After including this project to my iOS project, XCode is not longer recognizing my app as iOS app and not allow me to submit the new version.

Is something not mentioned in the instructions that i need to do to make it work?

thanks

How can this be implemented with Swift?

I've tried reworking the Obj-c example in the readme file, to implement a basic chart, but without any results.

Is there a working example file available somewhere?

There is only one view can be drawn?

In OS X Application, I use 3 AmChartView in single window, but only one AmChartView works.

All the way, I just want to display several charts in single window.

(A Swift Cocoa Application on OS X, Xcode 6.2 Beta 3)

"AmChartsMobile/AmCharts.h' file not found" when running Archive

Hi again!

I get 'AmChartsMobile/AmCharts.h' file not found when I run Archive for my project. Works fine when running on the phone and in the simulator...

Best regards,
Mikael DG

I think I found it . had forgotten about -ObjC for other configurations. I had put it i DEBUG but not the others...ADHOC and RELEASE...

Graph not rendered in WebView

Hello,
I'm building a UIView subclass that load 4 AmMobileChartView objects in page.
I load the UIView subclass programmatically in ViewDidAppear of the related controller.

Allocating che subclass and the AmMobileChartView works good, but sometimes graphs are not rendered.

I printed some logs and:

  • AmMobileChartView::webViewDidStartLoad runs
  • AmMobileChartView::webViewDidFinishLoad runs
  • drawChart() function run first "AmCharts is not ready yet!", than "AmCharts render graph" (added this log when "_chart && _isReady" is true)

Following a screenshot of what is happening on screen

img_0680

Thanks in advance

How to place marker on AmMap ?

This is probably outside the scope of this project, but is there a way to place a marker on AmMap (world map) given the marker latitude/longitude?

AmExport.h missing?

Hi,

Thanks for doing this!

I ran into an issue with not finding AmExport.h when building on iOS. For now I just commented it out in AmCharts.h...

Best regards,
Micke

AmCharts is not ready yet! with iOS 8 and Swift

Hello,
I have just added AmCharts wrapper to my new project... I added a AmMobileChartView to a CollectionCellView loaded from storyboard.

charView webview inside the AmMobileChartView won't initialiazed (print nil on log screen) and chat won't load.

Any help please?

Here some snippet...

//--- custom cell class
import UIKit
class SFA4CustomStatsCollectionViewCell: UICollectionViewCell {

    //define class objects
    @IBOutlet weak var amcGraphView: AmMobileChartView!
}

//--- collection view snippet
func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {
        let cell = collectionView.dequeueReusableCellWithReuseIdentifier(customStatsCollectionViewCell, forIndexPath: indexPath) as SFA4CustomStatsCollectionViewCell

        //TODO: configure cell here
        let theChart : AmPieChart! = SFA4DummyObject.getAMPieChartDummy()
        cell.amcGraphView.chart = theChart

        return cell
    }

func collectionView(collectionView: UICollectionView, willDisplayCell cell: UICollectionViewCell, forItemAtIndexPath indexPath: NSIndexPath) {
        let aCell = cell as SFA4CustomStatsCollectionViewCell
        aCell.amcGraphView.drawChart()
    }

Label doesn't show in iPhone

This Api is wonderful!

I have a problem showing legend in iPhone (iPad works fine)

AmSerialChart * chart = [[AmSerialChart alloc] init];
...
AmLegend* legend = [[AmLegend alloc] init];
[chart setLegend:legend];
...

I seeing the javascriptRepresentation of final chart, it's fine in both (iPhone and iPad). I've tried to resize the AmMobileChartView too. Anyway, I couldn't run any legend in iPhone :c.

/*Update/

  • Chart with legend in iPad:
    graph1

  • Chart container (UIView in iOS):
    grahp2

  • Chart with legend in iPhone:
    graph3

  • Chart container (UIView in iOS):
    graph4

  • I have an unique iOS Autolayout for all devices (iPod, iPhone and iPad):
    captura de pantalla 2015-04-29 a las 10 35 13 a m

  • Tried a @media only css set
    ...
    /* ----------- iPhone 6 ----------- /
    /
    Landscape */
    @media only screen
    and (min-device-width: 375px)
    and (max-device-width: 667px)
    and (-webkit-min-device-pixel-ratio: 2)
    and (orientation: landscape) {

    chartdiv

    {
    width:100%;
    height: 240px;
    }
    }
    ...

  • Tried put the chartdiv into a chart wrapper:
    ...

    ...

  • Intercepted the final html file content in "stringWithContent" string:
    NSURL localURL = [NSURL fileURLWithPath:self.templateFilepath];
    NSString
    stringWithContent = [NSString stringWithContentsOfFile:self.templateFilepath encoding:NSUTF8StringEncoding error:nil];
    [self.chartView loadHTMLString:stringWithContent baseURL:localURL];

And in both (iPhone and iPad) it's all right.

  • Anyway everything I try does not work on iPhone. In iPad continues works fine.

    /*Update/

Thanks!

Labels not showing in Pie chart

Hi,

I'm trying to implement the Amcharts Mobile Library, and as the screenshots below show, the labels for the pie chart fail to render in the IOS Simulator. The labels render fine for the chart on my website. The IOS simulator is for the iphone. Even when I copy and paste the code for the sample Pie Chart in the examples, the labels still dont show up.

This is the code in Objective C. I've tried enabling "labelsEnabled" but that doesn't work either.

AmPieChart *pieChart = [[AmPieChart alloc] init];
pieChart.type = @"pie";
pieChart.theme = @"dark";
pieChart.backgroundColor=@"#3f3f4f";
pieChart.backgroundAlpha=[NSNumber numberWithInteger: 1];
pieChart.percentPrecision=[NSNumber numberWithInteger: 1];
pieChart.depth3D=[NSNumber numberWithInteger: 10];
pieChart.labelsEnabled=YES;
pieChart.balloonText=@"[[title]]: [[num_grams]] grams/day";

NSMutableArray _dataProvider = [[NSMutableArray alloc] init];
[dataProvider addObject:@{@"nutrition" : @"Protein", @"calories" : @(rounded_protein_4), @"num_grams" : @(rounded_protein)}];
[dataProvider addObject:@{@"nutrition" : @"Carbs", @"calories" : @(rounded_carb_4), @"num_grams" : @(rounded_carb)}];
[dataProvider addObject:@{@"nutrition" : @"Fats", @"calories" : @(rounded_fat_9), @"num_grams" : @(rounded_fat)}];
[dataProvider addObject:@{@"nutrition" : @"Alcohol", @"calories" : @(rounded_alcohol*7), @"num_grams" : @(rounded_alcohol)}];
pieChart.dataProvider = dataProvider;

pieChart.valueField = @"calories";
pieChart.titleField = @"nutrition";
AmMobileChartView *new_nutrition_graph=[[AmMobileChartView alloc]initWithFrame:CGRectMake(0, 0, 300, 250)];

///////this is in tableview, and each cell has an AmMobileChartView named nutrition_chart

cell.nutrition_chart= new_nutrition_graph;
[cell.nutrition_chart setChart:pieChart];
[cell.nutrition_chart drawChart];

//////////nutrition_chart_view is the UIView container that will hold the nutrition_chart
[cell.nutrition_chart_view addSubview:cell.nutrition_chart];

screen shot 2015-06-20 at 8 02 02 pm
screen shot 2015-06-20 at 8 04 47 pm

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.